:root {
    --live-blue: #005596;
    --live-blue-dark: #003f73;
    --live-gold: #cdbb98;
    --live-ink: var(--text-main);
    --live-muted: var(--text-muted);
    --live-line: var(--panel-border);
    --live-surface: var(--panel-bg);
    --live-canvas: var(--shell-bg);
    --live-shadow: var(--shadow-soft);
    --live-command-bg: #24282c;
    --live-command-fg: #ffffff;
    --live-command-hover: #0f1113;
}

html[data-bs-theme="dark"] {
    color-scheme: dark;
    --live-blue: #5aa9e6;
    --live-blue-dark: #9bcdf2;
    --live-gold: #d8c7a7;
    --live-command-bg: #e8ecef;
    --live-command-fg: #111416;
    --live-command-hover: #ffffff;
}

* {
    box-sizing: border-box;
    letter-spacing: 0;
}

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

body.live-body {
    margin: 0;
    background: var(--live-canvas);
    color: var(--live-ink);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.live-warmup-banner {
    position: fixed;
    z-index: 20;
    top: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: max-content;
    max-width: calc(100vw - 2rem);
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--live-line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--live-surface) 92%, transparent);
    box-shadow: var(--live-shadow);
    color: var(--live-muted);
    font-size: 0.85rem;
}

.live-focus-main {
    min-height: 100vh;
}

.live-search-experience {
    min-height: 100vh;
    padding: clamp(5rem, 14vh, 9rem) 1.25rem 4rem;
}

.live-search-experience.has-results {
    min-height: 0;
    padding: 0;
}

.live-search-stage {
    width: min(760px, 100%);
    margin: 0 auto;
}

.live-brand-logo {
    display: block;
    width: min(440px, 76vw);
    height: auto;
    margin: 0 auto 2.75rem;
}

.live-search-form {
    position: relative;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 40px;
    gap: 10px;
    align-items: center;
    min-height: 64px;
    padding: 0 12px;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    background: var(--live-surface);
    box-shadow: var(--live-shadow);
}

.live-search-form:focus-within {
    border-color: color-mix(in srgb, var(--live-ink) 55%, var(--live-line));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--live-ink) 10%, transparent), var(--live-shadow);
}

.live-search-leading-icon {
    color: var(--live-muted);
    text-align: center;
}

.live-search-form input {
    width: 100%;
    min-width: 0;
    height: 60px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--live-ink);
    font-size: 1.08rem;
}

.live-search-form input::placeholder {
    color: #818b94;
}

.live-search-form > button {
    display: grid;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    place-items: center;
    align-self: center;
    justify-self: center;
    border: 0;
    border-radius: 6px;
    background: var(--live-command-bg);
    color: var(--live-command-fg);
    line-height: 1;
}

.live-search-form > button i {
    display: block;
    line-height: 1;
}

.live-search-form > button:hover,
.live-search-form > button:focus-visible {
    background: var(--live-command-hover);
    color: var(--live-command-fg);
}

.live-search-suggestions {
    position: absolute;
    z-index: 100;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    overflow: hidden;
    border: 1px solid var(--live-line);
    border-radius: 8px;
    background: var(--live-surface);
    box-shadow: var(--live-shadow);
}

.live-suggestion {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: center;
    min-height: 64px;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid var(--live-line);
    color: inherit;
    text-decoration: none;
}

.live-suggestion:last-child {
    border-bottom: 0;
}

.live-suggestion:hover,
.live-suggestion:focus-visible,
.live-suggestion.is-active {
    background: color-mix(in srgb, var(--live-blue) 10%, var(--live-surface));
    color: inherit;
}

.live-suggestion-icon,
.live-result-icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    overflow: hidden;
    border-radius: 6px;
    background: color-mix(in srgb, var(--live-blue) 12%, var(--live-surface));
    color: var(--live-blue);
}

.live-suggestion-icon img,
.live-result-row > img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
}

.live-suggestion-copy,
.live-result-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.live-suggestion-copy strong,
.live-result-copy strong {
    overflow: hidden;
    color: var(--live-ink);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-suggestion-copy span,
.live-result-copy span {
    overflow: hidden;
    color: var(--live-muted);
    font-size: 0.88rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-suggestion-category {
    color: var(--live-blue);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
}

.live-suggestion-more {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 16px;
    gap: 0.5rem;
    align-items: center;
    min-height: 48px;
    padding: 0.65rem 0.85rem;
    border-top: 1px solid var(--live-line);
    background: color-mix(in srgb, var(--live-ink) 3%, var(--live-surface));
    color: var(--live-muted);
    font-size: 0.84rem;
    text-decoration: none;
}

.live-suggestion-more strong {
    overflow: hidden;
    color: var(--live-ink);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-suggestion-more i {
    color: var(--live-muted);
    font-size: 0.72rem;
}

.live-suggestion-more:hover,
.live-suggestion-more:focus-visible,
.live-suggestion-more.is-active {
    background: color-mix(in srgb, var(--live-blue) 10%, var(--live-surface));
    color: var(--live-ink);
}

.live-search-scopes {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
    margin-top: 1.35rem;
}

.live-search-scopes a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-width: 0;
    padding: 0.55rem;
    color: var(--live-muted);
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
}

.live-search-scopes a:hover,
.live-search-scopes a:focus-visible {
    color: var(--live-blue);
}

.live-search-scopes i {
    color: var(--live-gold);
}

.live-results-shell {
    width: min(1040px, 100%);
    margin: 0 auto;
}

.live-results-header {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0.4rem 0 1rem;
    border-bottom: 1px solid var(--live-line);
}

.live-results-kicker {
    margin: 0 0 0.2rem;
    color: var(--live-muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.live-results-header h1 {
    margin: 0;
    color: var(--live-ink);
    font-size: 1.45rem;
    font-weight: 700;
}

.live-results-summary {
    margin: 0;
    color: var(--live-muted);
    font-size: 0.88rem;
}

.live-results-summary strong {
    color: var(--live-ink);
}

.live-results-summary span {
    color: var(--live-ink);
    font-weight: 600;
}

.live-result-list {
    margin-top: 0.35rem;
}

.live-result-row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto 18px;
    gap: 0.9rem;
    align-items: center;
    min-height: 64px;
    padding: 0.65rem 0.5rem;
    border-bottom: 1px solid var(--live-line);
    color: inherit;
    text-decoration: none;
}

.live-result-row:hover,
.live-result-row:focus-visible {
    background: color-mix(in srgb, var(--live-surface) 85%, transparent);
    color: inherit;
}

.live-result-category {
    color: var(--live-muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.live-result-arrow {
    color: #a1aab2;
    font-size: 0.75rem;
}

.live-empty-state {
    padding: 3rem 0;
    color: var(--live-muted);
    text-align: center;
}

.live-topbar {
    position: sticky;
    z-index: 50;
    top: 0;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    min-height: var(--shell-header-height);
    padding: 0.375rem 1rem;
    border-bottom: 1px solid var(--live-line);
    background: var(--panel-bg);
}

.live-topbar-brand img {
    display: block;
    width: 170px;
    height: auto;
}

.live-topbar-search {
    position: relative;
    width: 300px;
    max-width: min(100%, 300px);
    flex: 0 0 300px;
    min-width: 0;
}

.live-topbar-search-suggestions {
    right: 0;
    left: auto;
    width: min(440px, calc(100vw - 1.5rem));
    max-height: min(520px, calc(100vh - var(--shell-header-height) - 1rem));
    overflow-y: auto;
}

.live-topbar-search input {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--panel-border);
    border-radius: 999px;
    background: transparent;
    color: var(--live-ink);
    box-shadow: none;
}

.live-topbar-search input:focus {
    border-color: rgba(120, 120, 120, 0.45);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(140, 140, 140, 0.12);
}

.live-topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    min-width: 0;
    margin-left: auto;
}

.live-topbar-apps-button {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--live-ink);
    border: 1px solid var(--live-line);
    background: var(--live-surface);
    border-radius: 999px;
    padding: .45rem .75rem;
}

.live-topbar-apps-button:hover,
.live-topbar-apps-button:focus-visible,
.live-topbar-apps-button[aria-expanded="true"] {
    color: var(--live-blue);
    border-color: var(--live-blue);
}

.live-topbar-apps-menu {
    min-width: 15rem;
    padding: .7rem;
}

.live-topbar-apps-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem;
}

.live-topbar-app-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    padding: .7rem .45rem;
    color: var(--live-ink);
    text-align: center;
    text-decoration: none;
    border-radius: .65rem;
}

.live-topbar-app-link:hover,
.live-topbar-app-link:focus-visible {
    color: var(--live-blue);
    background: color-mix(in srgb, var(--live-blue) 10%, transparent);
}

.live-topbar-app-icon { font-size: 1.1rem; }
.live-topbar-app-label { font-size: .78rem; }

.live-settings-modal {
    color: var(--live-ink);
    background: var(--live-surface);
    border-color: var(--live-line);
}

.live-settings-modal .modal-header {
    border-bottom-color: var(--live-line);
}

.live-settings-modal .modal-footer {
    border-top-color: var(--live-line);
}

.live-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.live-fleet-view-select { width: auto; min-width: 7rem; }

.live-user-menu {
    min-width: 0;
}

.live-user-menu-button {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    margin: 0;
    padding: 0.15rem 0.45rem 0.15rem 0.15rem;
    border: 1px solid var(--panel-border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--panel-bg) 92%, var(--text-main) 8%);
    color: var(--live-ink);
    line-height: 1;
}

.live-user-menu-button:hover,
.live-user-menu-button:focus-visible,
.live-user-menu-button[aria-expanded="true"] {
    border-color: color-mix(in srgb, var(--panel-border) 60%, var(--text-main) 40%);
    background: color-mix(in srgb, var(--panel-bg) 96%, var(--text-main) 4%);
}

.live-user-avatar {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    flex-shrink: 0;
    border: 2px solid var(--panel-border);
    border-radius: 50%;
    background: var(--shell-bg);
    color: var(--text-muted);
    object-fit: cover;
}

.live-user-menu-chevron {
    color: var(--live-muted);
    font-size: 0.7rem;
    padding-right: 0.15rem;
}

.live-user-dropdown {
    z-index: 1250;
    min-width: 17.5rem;
    max-width: 22rem;
    padding: 0.35rem 0;
    border: 1px solid var(--panel-border);
    border-radius: 0.85rem;
    background: var(--panel-bg);
    box-shadow: var(--live-shadow);
}

.live-user-dropdown-header {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    padding: 0.65rem 0.85rem 0.5rem;
}

.live-user-dropdown-avatar {
    display: grid;
    width: 56px;
    height: 56px;
    place-items: center;
    flex-shrink: 0;
    border: 2px solid var(--panel-border);
    border-radius: 50%;
    background: var(--shell-bg);
    color: var(--text-muted);
    font-size: 1.25rem;
    object-fit: cover;
}

.live-user-avatar-fallback {
    padding: 0.35rem;
    object-fit: contain;
}

.live-user-dropdown-copy {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 0.2rem;
}

.live-user-dropdown-copy strong,
.live-user-dropdown-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-user-dropdown-copy strong {
    color: var(--text-main);
    font-size: 0.98rem;
}

.live-user-dropdown-copy small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.live-user-dropdown .dropdown-item {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    width: calc(100% - 0.7rem);
    margin: 0 0.35rem;
    border-radius: 0.45rem;
    color: var(--live-ink);
}

.live-user-dropdown form .dropdown-item {
    width: calc(100% - 0.7rem);
}

.live-user-theme-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    margin: 0 0.35rem;
    padding: 0.45rem 0.5rem;
    color: var(--text-main);
}

.live-user-theme-row > span {
    display: flex;
    gap: 0.55rem;
    align-items: center;
}

.live-user-theme-row > span > i {
    color: var(--text-muted);
}

.live-user-dropdown .dropdown-item:hover,
.live-user-dropdown .dropdown-item:focus {
    background: color-mix(in srgb, var(--live-ink) 7%, var(--live-surface));
    color: var(--live-ink);
}

.live-theme-switch {
    width: 64px;
    height: 34px;
    margin: 0;
    padding: 3px;
    border: 1px solid var(--live-line);
    border-radius: 17px;
    background: color-mix(in srgb, var(--live-ink) 8%, var(--live-surface));
}

.live-theme-switch-track {
    position: relative;
    display: grid;
    width: 100%;
    height: 100%;
    grid-template-columns: 1fr 1fr;
    align-items: center;
}

.live-theme-switch-track > i {
    z-index: 1;
    color: var(--live-muted);
    font-size: 0.72rem;
    text-align: center;
}

.live-theme-switch-knob {
    position: absolute;
    z-index: 0;
    top: 0;
    left: 0;
    width: 26px;
    height: 26px;
    border: 1px solid color-mix(in srgb, var(--live-ink) 12%, var(--live-line));
    border-radius: 50%;
    background: var(--live-surface);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.16);
    transition: transform 160ms ease;
}

.live-theme-switch[aria-checked="true"] .live-theme-switch-knob {
    transform: translateX(30px);
}

.live-theme-switch:hover,
.live-theme-switch:focus-visible {
    border-color: color-mix(in srgb, var(--live-ink) 35%, var(--live-line));
}

.live-theme-switch:focus-visible,
.live-user-menu-button:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--live-ink) 22%, transparent);
    outline-offset: 2px;
}

.live-corner-controls {
    position: fixed;
    z-index: 60;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.65rem;
    align-items: center;
}

.live-content-main {
    width: min(1440px, 100%);
    margin: 0 auto;
    padding: 1.5rem;
}

.live-login-shell {
    display: flex;
    width: min(420px, calc(100% - 2rem));
    min-height: 100vh;
    margin: 0 auto;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 0;
}

.live-login-logo {
    width: min(330px, 80vw);
    height: auto;
    margin: 0 auto 2.5rem;
}

.live-login-form {
    display: grid;
    gap: 0.7rem;
}

.live-login-form label {
    margin-top: 0.35rem;
    color: var(--live-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.live-login-form > input {
    height: 46px;
    padding: 0 0.8rem;
    border: 1px solid #cfd6dc;
    border-radius: 6px;
    background: var(--live-surface);
    color: var(--live-ink);
}

.live-login-form > input:focus {
    border-color: var(--live-blue);
    outline: 3px solid rgba(0, 85, 150, 0.12);
}

.live-remember {
    display: flex;
    gap: 0.55rem;
    align-items: center;
}

.live-login-form > button {
    height: 46px;
    margin-top: 0.7rem;
    border: 0;
    border-radius: 6px;
    background: var(--live-blue);
    color: #fff;
    font-weight: 700;
}

.live-validation {
    color: #a52834;
}

.live-message-page {
    display: grid;
    min-height: calc(100vh - 100px);
    place-content: center;
    justify-items: center;
    text-align: center;
}

.live-message-page > i {
    color: var(--live-gold);
    font-size: 2rem;
}

.live-message-page h1 {
    margin: 1rem 0 0.4rem;
    font-size: 1.5rem;
}

.live-message-page p {
    color: var(--live-muted);
}

.live-message-page a {
    color: var(--live-blue);
}

@media (max-width: 760px) {
    .live-search-experience {
        padding-top: 4rem;
    }

    .live-search-experience.has-results {
        padding: 0;
    }

    .live-brand-logo {
        margin-bottom: 2rem;
    }

    .live-search-scopes {
        grid-template-columns: repeat(2, 1fr);
    }

    .live-suggestion {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .live-suggestion-category {
        display: none;
    }

    .live-results-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.5rem;
    }

    .live-result-row {
        grid-template-columns: 40px minmax(0, 1fr) 18px;
    }

    .live-result-category {
        display: none;
    }

    .live-topbar {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding-inline: 0.85rem;
    }

    .live-topbar-brand img {
        width: 115px;
    }

    .live-topbar-actions {
        flex: 1 1 auto;
    }

    .live-topbar-search {
        width: min(300px, 45vw);
        flex-basis: min(300px, 45vw);
    }

    .live-corner-controls {
        top: 0.75rem;
        right: 0.75rem;
    }

    .live-content-main {
        padding: 0.85rem;
    }
}

@media (max-width: 420px) {
    .live-search-form {
        grid-template-columns: 24px minmax(0, 1fr) 38px;
        gap: 8px;
        padding-inline: 10px;
    }

    .live-search-form input {
        font-size: 0.95rem;
    }

    .live-result-row {
        gap: 0.65rem;
    }
}
