body {
    background: #f5f8fa;
}

[data-bs-theme="dark"] body {
    background: #0f1218;
}

.btn.btn-primary {
    background-color: var(--ps-primary);
    border-color: var(--ps-primary);
}

.btn.btn-primary:hover,
.btn.btn-primary:focus {
    background-color: color-mix(in srgb, var(--ps-primary) 86%, #000);
    border-color: color-mix(in srgb, var(--ps-primary) 86%, #000);
}

.btn.btn-light-primary,
.badge-light-primary {
    color: var(--ps-primary);
}

.text-primary {
    color: var(--ps-primary) !important;
}

.bg-primary {
    background-color: var(--ps-primary) !important;
}

.ci-app-body {
    color: #252f4a;
    min-height: 100vh;
}

.ci-flash-stack {
    display: grid;
    gap: 10px;
}

.ci-flash {
    align-items: flex-start;
    border: 1px solid #dfe3ea;
    border-left-width: 6px;
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
    display: flex;
    gap: 14px;
    padding: 16px 18px;
}

.ci-flash i {
    flex: 0 0 auto;
    font-size: 24px;
    line-height: 1;
    margin-top: 2px;
}

.ci-flash strong,
.ci-flash span {
    display: block;
}

.ci-flash strong {
    color: #071437;
    font-weight: 800;
    margin-bottom: 3px;
}

.ci-flash span {
    color: #252f4a;
    line-height: 1.45;
}

.ci-flash-error {
    background: #fff5f7;
    border-color: #f7b6c4;
    border-left-color: #f1416c;
}

.ci-flash-error i {
    color: #f1416c;
}

.ci-flash-success {
    background: #f0fff7;
    border-color: #a7f0c5;
    border-left-color: #50cd89;
}

.ci-flash-success i {
    color: #50cd89;
}

.ci-flash-info {
    background: #f1f7ff;
    border-color: #badcff;
    border-left-color: var(--ps-primary);
}

.ci-flash-info i {
    color: var(--ps-primary);
}

.ci-runtime-notices {
    display: grid;
    gap: 10px;
    max-width: 520px;
    position: fixed;
    right: 24px;
    top: 92px;
    width: calc(100vw - 48px);
    z-index: 1080;
}

.ci-shell {
    display: flex;
    min-height: 100vh;
}

.ci-sidebar {
    background: #ffffff;
    border-right: 1px solid #eef0f4;
    flex: 0 0 286px;
    height: 100vh;
    overflow-y: auto;
    padding: 22px 18px;
    position: sticky;
    top: 0;
    width: 286px;
    z-index: 20;
}

.ci-shell.ci-sidebar-collapsed .ci-sidebar {
    flex-basis: 86px;
    padding-left: 12px;
    padding-right: 12px;
    width: 86px;
}

.ci-shell.ci-sidebar-collapsed .ci-brand-text,
.ci-shell.ci-sidebar-collapsed .ci-client-card,
.ci-shell.ci-sidebar-collapsed .ci-nav-section,
.ci-shell.ci-sidebar-collapsed .ci-nav-link span,
.ci-shell.ci-sidebar-collapsed .ci-nav-note {
    display: none;
}

.ci-shell.ci-sidebar-collapsed .ci-brand-link,
.ci-shell.ci-sidebar-collapsed .ci-nav-link {
    justify-content: center;
}

.ci-shell.ci-sidebar-collapsed .ci-nav-link {
    min-height: 48px;
    padding-left: 0;
    padding-right: 0;
}

.ci-shell.ci-sidebar-collapsed .ci-nav-link i {
    margin: 0;
    text-align: center;
}

.ci-sidebar-brand {
    margin-bottom: 22px;
}

.ci-brand-link {
    align-items: center;
    color: #071437;
    display: flex;
    gap: 12px;
    text-decoration: none;
}

.ci-brand-icon,
.auth-brand-icon {
    border-radius: 8px;
    height: 42px;
    object-fit: contain;
    width: 42px;
}

.auth-brand-logo {
    max-height: 42px;
    max-width: 180px;
    object-fit: contain;
}

.ci-brand-mark {
    align-items: center;
    background: var(--ps-primary);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 42px;
    font-weight: 800;
    height: 42px;
    justify-content: center;
    letter-spacing: 0;
    text-transform: uppercase;
    width: 42px;
}

.ci-brand-text {
    display: grid;
    font-weight: 800;
    line-height: 1.1;
}

.ci-brand-text small {
    color: #99a1b7;
    font-size: 12px;
    font-weight: 700;
    margin-top: 4px;
    text-transform: uppercase;
}

.ci-client-card {
    align-items: center;
    background: #f8fafd;
    border: 1px solid #eef0f4;
    border-radius: 8px;
    display: flex;
    gap: 12px;
    margin-bottom: 26px;
    padding: 14px;
}

.ci-client-icon {
    border-radius: 8px;
    height: 38px;
    object-fit: contain;
    width: 38px;
}

.ci-client-initials {
    align-items: center;
    background: #fff;
    border: 1px solid #dce4f1;
    border-radius: 8px;
    color: var(--ps-primary);
    display: inline-flex;
    flex: 0 0 38px;
    font-weight: 800;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.ci-client-label {
    color: #99a1b7;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.ci-client-name {
    color: #252f4a;
    font-size: 13px;
    font-weight: 800;
    max-width: 178px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ci-nav {
    display: grid;
    gap: 5px;
}

.ci-nav-section {
    color: #a1a5b7;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    margin: 18px 10px 8px;
    text-transform: uppercase;
}

.ci-nav-link {
    align-items: center;
    border-radius: 8px;
    color: #5e6278;
    display: flex;
    font-size: 14px;
    font-weight: 700;
    gap: 12px;
    min-height: 44px;
    padding: 10px 12px;
    text-decoration: none;
}

.ci-nav-link i {
    color: #99a1b7;
    font-size: 19px;
    width: 22px;
}

.ci-nav-link:hover,
.ci-nav-link.active {
    background: #f1f7ff;
    color: var(--ps-primary);
}

.ci-nav-link:hover i,
.ci-nav-link.active i {
    color: var(--ps-primary);
}

.ci-nav-sub {
    font-size: 13px;
    min-height: 38px;
    padding-left: 22px;
}

.ci-nav-sub i {
    font-size: 16px;
}

.ci-nav-note {
    color: #99a1b7;
    display: block;
    font-size: 12px;
    line-height: 1.45;
    padding: 8px 12px;
}

.ci-main {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.ci-topbar {
    align-items: center;
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid #eef0f4;
    display: flex;
    justify-content: space-between;
    min-height: 76px;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 15;
}

.ci-topbar-eyebrow {
    color: #99a1b7;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.ci-topbar-title {
    color: #071437;
    font-size: 18px;
    font-weight: 800;
}

.ci-topbar-actions {
    align-items: center;
    display: flex;
    gap: 10px;
}

.ci-company-pill {
    align-items: center;
    display: inline-flex;
    font-size: 13px;
    min-height: 38px;
    padding: 0 14px;
}

.ci-sidebar-toggle {
    display: inline-flex;
}

.ci-sidebar-backdrop {
    display: none;
}

.ci-content {
    padding: 28px;
}

.ci-notification-icon,
.ci-stat-icon {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    flex: 0 0 42px;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.ci-notification-icon i,
.ci-stat-icon i {
    font-size: 20px;
}

.ci-theme-option.active {
    background: #f1f7ff;
    color: var(--ps-primary);
    font-weight: 700;
}

.app-logo {
    max-height: 34px;
    width: auto;
}

.app-logo-fallback {
    align-items: center;
    background: var(--ps-primary);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-weight: 700;
    height: 34px;
    justify-content: center;
    text-transform: uppercase;
    width: 34px;
}

.app-panel {
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 8px;
    padding: 22px;
}

.panel-header {
    align-items: center;
    border-bottom: 1px solid #eef0f4;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin: -4px 0 18px;
    padding-bottom: 14px;
}

.ci-demo-hero {
    align-items: center;
    background: #ffffff;
    border: 1px solid #e6e9ef;
    border-radius: 8px;
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
    margin-bottom: 22px;
    overflow: hidden;
    padding: 28px;
}

.ci-demo-hero-copy {
    max-width: 760px;
}

.ci-demo-hero h1,
.auth-visual-content h1 {
    color: #071437;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.14;
    margin-bottom: 16px;
}

.ci-demo-hero p,
.auth-visual-content p {
    color: #5e6278;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 680px;
}

.ci-demo-hero-visual {
    align-items: center;
    background: #f7fbff;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    min-height: 250px;
    padding: 14px;
}

.ci-demo-hero-visual img {
    display: block;
    max-height: 280px;
    max-width: 100%;
}

.ci-quote-flow-animation {
    background: #f8fafd;
    border: 1px solid #e7edf7;
    border-radius: 8px;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: 230px;
    padding: 24px 18px;
    position: relative;
    width: 100%;
}

.ci-quote-flow-track {
    background: #dce4f1;
    border-radius: 999px;
    height: 8px;
    left: 54px;
    overflow: hidden;
    position: absolute;
    right: 54px;
    top: 78px;
}

.ci-quote-flow-track span {
    animation: quoteFlowBar 4.4s ease-in-out infinite;
    background: linear-gradient(90deg, var(--ps-primary), #10b7ad, var(--ps-accent));
    border-radius: inherit;
    display: block;
    height: 100%;
    transform-origin: left center;
}

.ci-quote-flow-step {
    align-items: center;
    animation: quoteFlowStep 4.4s ease-in-out infinite;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    position: relative;
    text-align: center;
    z-index: 1;
}

.ci-quote-flow-step span {
    align-items: center;
    background: #ffffff;
    border: 1px solid #dce4f1;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(27, 132, 255, .08);
    color: #99a1b7;
    display: inline-flex;
    font-size: 26px;
    height: 66px;
    justify-content: center;
    margin-bottom: 16px;
    width: 66px;
}

.ci-quote-flow-step strong {
    color: #252f4a;
    display: block;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
}

.ci-quote-flow-step small {
    color: #99a1b7;
    display: block;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    margin-top: 6px;
}

.ci-quote-flow-ai {
    animation-delay: .35s;
}

.ci-quote-flow-check {
    animation-delay: .7s;
}

.ci-quote-flow-result {
    animation-delay: 1.05s;
}

.ci-stat-card {
    align-items: center;
    background: #ffffff;
    border: 1px solid #e6e9ef;
    border-radius: 8px;
    display: flex;
    gap: 16px;
    min-height: 104px;
    padding: 20px;
}

.ci-stat-value {
    color: #071437;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.15;
}

.ci-stat-label {
    color: #99a1b7;
    font-size: 13px;
    font-weight: 700;
    margin-top: 4px;
}

.ci-empty-state {
    align-items: center;
    display: flex;
    flex-direction: column;
    padding: 42px 20px;
    text-align: center;
}

.ci-empty-icon {
    align-items: center;
    background: #f1f7ff;
    border-radius: 8px;
    color: var(--ps-primary);
    display: inline-flex;
    font-size: 28px;
    height: 58px;
    justify-content: center;
    margin-bottom: 16px;
    width: 58px;
}

.ci-empty-state h3 {
    color: #071437;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
}

.ci-empty-state p {
    color: #7e8299;
    margin-bottom: 18px;
    max-width: 440px;
}

.auth-page {
    background: #f3f6f9;
    min-height: 100vh;
}

.auth-enterprise {
    background:
        linear-gradient(115deg, rgba(5, 14, 31, .72), rgba(5, 14, 31, .42)),
        var(--auth-bg) center/cover no-repeat fixed;
}

.auth-enterprise-shell {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 34px;
    position: relative;
}

.auth-enterprise-brand {
    align-items: center;
    color: #fff;
    display: inline-flex;
    font-size: 22px;
    font-weight: 800;
    gap: 12px;
    left: 34px;
    position: absolute;
    top: 28px;
}

.auth-enterprise .auth-toolbar {
    position: absolute;
    right: 34px;
    top: 28px;
}

.auth-form-centered {
    backdrop-filter: blur(18px);
    background: rgba(255, 255, 255, .94);
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(520px, 1fr) minmax(420px, .58fr);
    min-height: 100vh;
}

.auth-visual {
    background: #f7fbff;
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-width: 0;
    padding: 42px;
    position: relative;
}

.auth-brand {
    align-items: center;
    color: #071437;
    display: inline-flex;
    font-size: 22px;
    font-weight: 800;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.auth-visual-content {
    align-self: center;
    max-width: 720px;
    position: relative;
    z-index: 1;
}

.auth-proof-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.auth-proof-row span {
    align-items: center;
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 8px;
    color: #3f4254;
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
}

.auth-proof-row i {
    color: var(--ps-accent);
}

.auth-illustration-wrap {
    align-items: flex-end;
    display: flex;
    justify-content: flex-start;
    position: relative;
    z-index: 1;
}

.auth-illustration {
    display: block;
    max-height: 300px;
    max-width: min(620px, 100%);
    width: 100%;
}

.auth-panel {
    align-items: center;
    background: var(--bs-body-bg);
    display: flex;
    justify-content: center;
    padding: 42px;
    position: relative;
}

.auth-toolbar {
    position: absolute;
    right: 28px;
    top: 28px;
}

.auth-form.card {
    border: 1px solid #e6e9ef;
    border-radius: 8px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .08);
    max-width: 440px;
    width: 100%;
}

.auth-form-logo {
    max-height: 58px;
    max-width: 220px;
    object-fit: contain;
}

.auth-security-note {
    align-items: flex-start;
    background: #f8fafd;
    border: 1px solid #eef0f4;
    border-radius: 8px;
    color: #5e6278;
    display: flex;
    font-size: 12px;
    font-weight: 700;
    gap: 10px;
    line-height: 1.45;
    margin-top: 22px;
    padding: 12px;
}

.auth-security-note i {
    color: var(--ps-accent);
    font-size: 18px;
}

.quote-layout {
    align-items: start;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 1fr) minmax(390px, 480px);
    min-height: calc(100vh - 170px);
    max-width: 100%;
}

.quote-layout > *,
.quote-workspace-main,
.quote-wizard-panel,
.quote-stage-wizard,
.quote-chat {
    min-width: 0;
}

.quote-detail-heading h1 {
    line-height: 1.05;
}

.quote-workspace-main {
    display: grid;
    gap: 18px;
}

.quote-wizard-panel {
    overflow: hidden;
}

.quote-stage-wizard {
    align-items: stretch;
    display: grid;
    gap: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-top: 6px;
    position: relative;
}

.quote-stage-flow-track {
    background: #e6e9ef;
    border-radius: 999px;
    height: 6px;
    left: 16.666%;
    overflow: hidden;
    position: absolute;
    right: 16.666%;
    top: 38px;
    z-index: 0;
}

.quote-stage-flow-track span {
    background: linear-gradient(90deg, var(--ps-primary), #17c653);
    border-radius: inherit;
    display: block;
    height: 100%;
    transform-origin: left center;
    transition: width .25s ease;
    width: var(--quote-progress, 0%);
}

.quote-stage {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: flex-start;
    min-height: 126px;
    min-width: 0;
    padding: 0 18px;
    position: relative;
    text-align: center;
    z-index: 1;
}

.quote-stage > div {
    min-width: 0;
    width: 100%;
}

.quote-stage-icon {
    align-items: center;
    background: #fff;
    border: 2px solid #dce4f1;
    border-radius: 50%;
    color: #99a1b7;
    display: inline-flex;
    flex: 0 0 64px;
    font-size: 21px;
    height: 64px;
    justify-content: center;
    width: 64px;
}

.quote-stage strong,
.quote-stage small,
.quote-stage em {
    display: block;
}

.quote-stage strong {
    color: #252f4a;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.quote-stage small {
    color: #99a1b7;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    margin-top: 4px;
    overflow-wrap: anywhere;
}

.quote-stage em {
    background: #f1f7ff;
    border-radius: 999px;
    color: var(--ps-primary);
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
    margin: 10px auto 0;
    padding: 5px 10px;
    width: fit-content;
}

.quote-stage-active {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.quote-stage-active .quote-stage-icon {
    animation: stageActivePulse 1.8s ease-in-out infinite;
    background: var(--ps-primary);
    border-color: var(--ps-primary);
    color: #fff;
}

.quote-stage-done {
    background: transparent;
    border-color: transparent;
}

.quote-stage-done .quote-stage-icon {
    background: #50cd89;
    border-color: #50cd89;
    color: #fff;
}

.quote-stage-done em {
    background: #e8fff3;
    color: #1f8f5a;
}

@keyframes quoteFlowPulse {
    0%, 100% {
        opacity: .68;
        transform: scaleX(.72);
    }
    50% {
        opacity: 1;
        transform: scaleX(1);
    }
}

@keyframes stageActivePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(27, 132, 255, .24);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(27, 132, 255, 0);
    }
}

.quote-wizard-warning {
    align-items: flex-start;
    background: #fff5f7;
    border: 1px solid #f7b6c4;
    border-left: 5px solid #f1416c;
    border-radius: 8px;
    color: #252f4a;
    display: flex;
    gap: 12px;
    margin-top: 14px;
    padding: 14px 16px;
}

.quote-wizard-warning i {
    color: #f1416c;
    font-size: 20px;
}

.quote-wizard-warning strong,
.quote-wizard-warning span {
    display: block;
}

.quote-wizard-warning strong {
    color: #071437;
    font-weight: 800;
    margin-bottom: 2px;
}

.quote-chat {
    align-self: start;
    border: 1px solid #e6e9ef;
    border-radius: 8px;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 126px);
    max-height: calc(100vh - 126px);
    min-height: 0;
    overflow: hidden;
    position: sticky;
    top: 94px;
}

.quote-chat .card-header,
.quote-chat .card-footer {
    flex: 0 0 auto;
}

.quote-chat .card-header {
    min-height: auto;
}

.quote-chat .card-title {
    min-width: 0;
}

.quote-chat-footer {
    background: #ffffff;
    position: relative;
    z-index: 5;
}

.quote-chat-body {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.quote-chat-messages {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
}

.quote-message-text {
    border: 1px solid rgba(27, 132, 255, .08);
    line-height: 1.55;
    max-width: min(100%, 520px);
    overflow-wrap: anywhere;
}

.quote-chat.is-loading .quote-chat-messages {
    scroll-behavior: smooth;
}

.quote-chat-typing {
    align-items: center;
    display: inline-flex;
    gap: 5px;
    min-width: 54px;
}

.quote-chat-typing span {
    animation: quoteTypingDot 1.1s ease-in-out infinite;
    background: var(--ps-primary);
    border-radius: 999px;
    display: inline-flex;
    height: 7px;
    opacity: .35;
    width: 7px;
}

.quote-chat-typing span:nth-child(2) {
    animation-delay: .16s;
}

.quote-chat-typing span:nth-child(3) {
    animation-delay: .32s;
}

@keyframes quoteTypingDot {
    0%, 100% {
        opacity: .35;
        transform: translateY(0);
    }
    45% {
        opacity: 1;
        transform: translateY(-4px);
    }
}

.ci-chat-empty,
.ci-preview-empty {
    align-items: center;
    border: 1px dashed #d7dfec;
    border-radius: 8px;
    color: #7e8299;
    display: grid;
    gap: 8px;
    justify-items: center;
    padding: 28px 18px;
    text-align: center;
}

.ci-chat-empty span,
.ci-preview-empty i {
    align-items: center;
    background: #f1f7ff;
    border-radius: 8px;
    color: var(--ps-primary);
    display: inline-flex;
    font-size: 24px;
    height: 50px;
    justify-content: center;
    width: 50px;
}

.ci-chat-empty strong {
    color: #252f4a;
}

.ci-chat-empty p {
    margin: 0;
}

.chat-attachment {
    color: #7e8299;
    font-size: 12px;
    font-weight: 700;
    margin-top: 8px;
}

.chat-form {
    border-top: 1px solid #eef0f4;
    margin-top: 16px;
    padding-top: 16px;
}

.quote-chat-footer .chat-form {
    border-top: 0;
    margin-top: 0;
    padding-top: 0;
}

.quote-text-entry {
    background: #f8fafd;
    border: 1px solid #dce4f1;
    border-radius: 8px;
    padding: 14px;
    position: relative;
    z-index: 6;
}

.quote-text-label {
    align-items: center;
    color: #252f4a;
    display: flex;
    font-size: 13px;
    font-weight: 800;
    gap: 8px;
    margin-bottom: 10px;
}

.quote-text-label i {
    color: var(--ps-primary);
    font-size: 18px;
}

.quote-message-input {
    background: #ffffff;
    border: 1px solid #bfcbe0 !important;
    border-radius: 8px;
    caret-color: var(--ps-primary);
    color: #252f4a;
    cursor: text !important;
    display: block;
    min-height: 116px;
    padding: 14px 16px;
    pointer-events: auto !important;
    resize: vertical;
    user-select: text;
    width: 100%;
    z-index: 7;
}

.quote-message-input:focus {
    border-color: var(--ps-primary) !important;
    box-shadow: 0 0 0 3px rgba(27, 132, 255, .12);
}

.quote-text-help {
    color: #7e8299;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
    margin-top: 10px;
}

.chat-file-drop {
    align-items: center;
    border: 1px dashed #cfd8e6;
    border-radius: 8px;
    color: #5e6278;
    cursor: pointer;
    display: flex;
    gap: 10px;
    justify-content: center;
    min-height: 52px;
    padding: 12px;
}

.chat-file-drop input {
    display: none;
}

.chat-file-drop i {
    color: var(--ps-primary);
    font-size: 18px;
}

.demo-image-form {
    border-top: 1px solid #eef0f4;
    margin-top: 14px;
    padding-top: 14px;
}

.quote-qty {
    min-width: 86px;
}

.quote-candidate-control {
    min-width: 360px;
    position: relative;
}

.candidate-search-shell {
    align-items: center;
    display: flex;
    position: relative;
}

.candidate-search-shell i {
    color: #99a1b7;
    left: 12px;
    pointer-events: none;
    position: absolute;
    z-index: 1;
}

.candidate-search-shell .form-control {
    padding-left: 38px;
}

.candidate-help {
    color: #99a1b7;
    font-size: 11px;
    font-weight: 700;
    margin-top: 5px;
}

.candidate-results {
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 8px;
    box-shadow: 0 16px 32px rgba(15, 23, 42, .08);
    margin-top: 8px;
    max-height: 260px;
    overflow: auto;
    padding: 6px;
}

.candidate-results-inner {
    display: grid;
    gap: 4px;
}

.candidate-option {
    align-items: flex-start;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #252f4a;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 9px 10px;
    text-align: left;
    width: 100%;
}

.candidate-option:hover,
.candidate-option.is-selected {
    background: #eef6ff;
    border-color: #badcff;
}

.candidate-main {
    min-width: 0;
}

.candidate-main strong,
.candidate-main small {
    display: block;
}

.candidate-main strong {
    color: #071437;
    font-size: 12px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.candidate-main small {
    color: #7e8299;
    font-size: 12px;
    line-height: 1.35;
    margin-top: 2px;
}

.candidate-meta {
    color: var(--ps-primary);
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.candidate-empty {
    align-items: center;
    color: #7e8299;
    display: flex;
    gap: 8px;
    justify-content: center;
    min-height: 58px;
    padding: 10px;
    text-align: center;
}

.candidate-empty i {
    color: #99a1b7;
}

.quote-preview {
    align-self: start;
}

.process-intro {
    align-items: center;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, .9fr) minmax(360px, 1fr);
    overflow: hidden;
}

.process-intro-copy h2 {
    color: #071437;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.2;
    margin-bottom: 10px;
}

.process-intro-copy p {
    color: #7e8299;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

.process-steps {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.process-step {
    animation: processPulse 2.8s ease-in-out infinite;
    background: #f8fafd;
    border: 1px solid #e6e9ef;
    border-radius: 8px;
    min-height: 140px;
    padding: 14px;
}

.process-step:nth-child(2) {
    animation-delay: .25s;
}

.process-step:nth-child(3) {
    animation-delay: .5s;
}

.process-step:nth-child(4) {
    animation-delay: .75s;
}

.process-step span {
    align-items: center;
    background: #f1f7ff;
    border-radius: 8px;
    color: var(--ps-primary);
    display: inline-flex;
    font-size: 22px;
    height: 48px;
    justify-content: center;
    margin-bottom: 12px;
    width: 48px;
}

.process-step strong,
.process-step small {
    display: block;
}

.process-step strong {
    color: #252f4a;
    font-size: 14px;
    margin-bottom: 4px;
}

.process-step small {
    color: #99a1b7;
    font-weight: 700;
    line-height: 1.35;
}

@keyframes processPulse {
    0%, 100% {
        transform: translateY(0);
        box-shadow: none;
    }
    45% {
        transform: translateY(-4px);
        box-shadow: 0 12px 24px rgba(27, 132, 255, .10);
    }
}

.ci-empty-state-compact {
    padding: 28px 20px;
}

.preview-lines {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preview-line {
    align-items: flex-start;
    border-bottom: 1px solid #eef0f4;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding-bottom: 12px;
}

.preview-totals {
    border-top: 1px solid #dfe3ea;
    display: grid;
    gap: 8px;
    margin-top: 18px;
    padding-top: 14px;
}

.preview-totals div {
    display: flex;
    justify-content: space-between;
}

.preview-totals .total {
    color: #071437;
    font-size: 18px;
}

.setup-grid {
    align-items: start;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) 360px;
}

.settings-layout,
.demo-data-layout {
    align-items: start;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) 360px;
}

.demo-data-layout {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.master-hero {
    align-items: center;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, .95fr) minmax(380px, .7fr);
    overflow: hidden;
}

.master-hero h1 {
    color: #071437;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.18;
    margin: 0 0 10px;
}

.master-hero p {
    color: #7e8299;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
    max-width: 760px;
}

.master-flow-animation {
    background: #f8fafd;
    border: 1px solid #eef0f4;
    border-radius: 8px;
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 210px;
    padding: 22px;
    position: relative;
}

.master-flow-track {
    background: #dce4f1;
    border-radius: 999px;
    height: 6px;
    left: 58px;
    overflow: hidden;
    position: absolute;
    right: 58px;
    top: 74px;
}

.master-flow-track span {
    animation: masterFlowBar 3.6s ease-in-out infinite;
    background: linear-gradient(90deg, var(--ps-primary), var(--ps-accent));
    border-radius: inherit;
    display: block;
    height: 100%;
    transform-origin: left center;
}

.master-flow-step {
    align-items: center;
    animation: masterFlowStep 3.6s ease-in-out infinite;
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
    min-width: 0;
    position: relative;
    text-align: center;
    z-index: 1;
}

.master-flow-step span {
    align-items: center;
    background: #ffffff;
    border: 1px solid #dce4f1;
    border-radius: 8px;
    color: var(--ps-primary);
    display: inline-flex;
    font-size: 24px;
    height: 58px;
    justify-content: center;
    margin-bottom: 10px;
    width: 58px;
}

.master-flow-step strong,
.master-flow-step small {
    display: block;
}

.master-flow-step strong {
    color: #252f4a;
    font-size: 14px;
    font-weight: 800;
}

.master-flow-step small {
    color: #99a1b7;
    font-size: 12px;
    font-weight: 700;
}

.master-flow-verify {
    animation-delay: .45s;
}

.master-flow-result {
    animation-delay: .9s;
}

.master-stat-link {
    color: inherit;
    text-decoration: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.master-stat-link:hover {
    border-color: color-mix(in srgb, var(--ps-primary) 36%, #dce4f1);
    box-shadow: 0 14px 28px rgba(15, 23, 42, .07);
    color: inherit;
    transform: translateY(-2px);
}

.master-directory {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.master-directory-item {
    align-items: center;
    background: #f8fafd;
    border: 1px solid #eef0f4;
    border-radius: 8px;
    color: #252f4a;
    display: grid;
    gap: 12px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 112px;
    padding: 16px;
    text-decoration: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.master-directory-item:hover {
    border-color: color-mix(in srgb, var(--ps-primary) 36%, #dce4f1);
    box-shadow: 0 14px 28px rgba(15, 23, 42, .07);
    color: #252f4a;
    transform: translateY(-2px);
}

.master-directory-item strong,
.master-directory-item small {
    display: block;
}

.master-directory-item strong {
    color: #071437;
    font-size: 15px;
    font-weight: 800;
}

.master-directory-item small {
    color: #7e8299;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    margin-top: 3px;
}

.master-directory-item > i {
    color: #99a1b7;
    font-size: 24px;
}

.master-table-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.master-table-stack {
    display: grid;
    gap: 24px;
}

.master-list-card {
    scroll-margin-top: 98px;
}

.master-list-page {
    min-height: calc(100vh - 132px);
}

.master-list-toolbar {
    align-items: center;
    border-bottom: 1px solid #eef0f4;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 18px;
}

.master-list-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.master-search {
    align-items: center;
    display: flex;
    min-width: min(320px, 100%);
    position: relative;
}

.master-search i {
    color: #99a1b7;
    left: 14px;
    pointer-events: none;
    position: absolute;
}

.master-search .form-control {
    padding-left: 42px;
}

.master-table-content {
    min-height: 360px;
}

.master-table-summary {
    align-items: center;
    background: #f8fafd;
    border: 1px solid #eef0f4;
    border-radius: 8px;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 12px 14px;
}

.master-table-summary strong {
    color: #071437;
    font-weight: 800;
}

.master-table-summary span,
.master-table-summary small {
    color: #7e8299;
    font-weight: 700;
}

.master-pagination {
    align-items: center;
    border-top: 1px solid #eef0f4;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 16px;
}

tr.master-row-hidden {
    display: none;
}

.master-form-shell {
    margin: 0 auto;
    max-width: 960px;
}

.master-separated-form {
    padding-top: 6px;
}

@keyframes masterFlowBar {
    0% {
        transform: scaleX(.06);
    }
    36% {
        transform: scaleX(.5);
    }
    72%,
    100% {
        transform: scaleX(1);
    }
}

@keyframes masterFlowStep {
    0%,
    100% {
        transform: translateY(0);
    }
    36% {
        transform: translateY(-5px);
    }
    52% {
        transform: translateY(0);
    }
}

@keyframes quoteFlowBar {
    0% {
        transform: scaleX(.05);
    }
    26% {
        transform: scaleX(.36);
    }
    52% {
        transform: scaleX(.66);
    }
    78%,
    100% {
        transform: scaleX(1);
    }
}

@keyframes quoteFlowStep {
    0%,
    100% {
        transform: translateY(0);
    }
    38% {
        transform: translateY(-6px);
    }
    58% {
        transform: translateY(0);
    }
}

.about-hero {
    margin-bottom: 22px;
}

.about-hero h1 {
    color: #071437;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.18;
    margin-bottom: 12px;
    max-width: 860px;
}

.about-hero p {
    color: #7e8299;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    max-width: 860px;
}

.about-card {
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 8px;
    height: 100%;
    padding: 24px;
}

.about-card-icon {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    font-size: 24px;
    height: 54px;
    justify-content: center;
    margin-bottom: 18px;
    width: 54px;
}

.about-card h2 {
    color: #071437;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
}

.about-card p {
    color: #7e8299;
    line-height: 1.6;
    margin: 0;
}

.setup-main {
    padding: 24px;
}

.setup-section {
    border-top: 1px solid #eef0f4;
    padding-top: 24px;
}

.setup-section + .setup-section {
    margin-top: 28px;
}

.setup-section-title {
    align-items: flex-start;
    display: flex;
    gap: 14px;
    margin-bottom: 20px;
}

.setup-section-title span {
    align-items: center;
    background: #f1f7ff;
    border-radius: 8px;
    color: var(--ps-primary);
    display: inline-flex;
    flex: 0 0 42px;
    font-size: 20px;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.setup-section-title h2 {
    color: #071437;
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 4px;
}

.setup-section-title p {
    color: #7e8299;
    margin: 0;
}

.setup-notes {
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 8px;
    padding: 22px;
    position: sticky;
    top: 98px;
}

.setup-preview {
    background: #f8fafd;
    border: 1px solid #eef0f4;
    border-radius: 8px;
    margin-bottom: 22px;
    padding: 16px;
}

.setup-preview-brand {
    align-items: center;
    display: flex;
    gap: 12px;
}

.setup-preview-brand img {
    border-radius: 8px;
    height: 42px;
    object-fit: contain;
    width: 42px;
}

.setup-preview-brand strong,
.setup-preview-brand span {
    display: block;
}

.setup-preview-brand span {
    color: #99a1b7;
    font-size: 12px;
    font-weight: 700;
}

.setup-preview-image {
    border-radius: 8px;
    display: block;
    margin-top: 16px;
    max-height: 180px;
    object-fit: cover;
    width: 100%;
}

.code-note {
    background: #f6f8fb;
    border: 1px solid #e6e9ef;
    border-radius: 8px;
    color: #5e6278;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    margin-top: 8px;
    overflow-wrap: anywhere;
    padding: 10px;
}

.llm-key-current {
    align-items: flex-start;
    background: #f0fff7;
    border: 1px solid #a7f0c5;
    border-radius: 8px;
    display: flex;
    gap: 12px;
    padding: 14px;
}

.llm-key-current > span {
    align-items: center;
    background: #ffffff;
    border-radius: 8px;
    color: #50cd89;
    display: inline-flex;
    flex: 0 0 42px;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.llm-key-current strong,
.llm-key-current small {
    display: block;
}

.llm-key-current strong {
    color: #071437;
    font-weight: 800;
    margin-bottom: 2px;
}

.llm-key-current small {
    color: #5e6278;
    font-size: 13px;
    line-height: 1.45;
}

.search-status-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.search-status-item {
    align-items: center;
    background: #f8fafd;
    border: 1px solid #eef0f4;
    border-radius: 8px;
    display: flex;
    gap: 12px;
    min-height: 86px;
    padding: 14px;
}

.search-status-item span {
    align-items: center;
    background: #fff;
    border: 1px solid #dce4f1;
    border-radius: 8px;
    color: var(--ps-primary);
    display: inline-flex;
    flex: 0 0 42px;
    font-size: 20px;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.search-status-item strong,
.search-status-item small {
    display: block;
}

.search-status-item strong {
    color: #252f4a;
    font-size: 13px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.search-status-item small {
    color: #99a1b7;
    font-size: 12px;
    line-height: 1.35;
    margin-top: 3px;
}

.setup-elastic-note {
    background: #f8fafd;
    border: 1px solid #eef0f4;
    border-radius: 8px;
    padding: 14px;
}

.setup-discovery-card {
    background: #f8fafd;
    border: 1px solid #eef0f4;
    border-radius: 8px;
    padding: 18px;
}

.setup-discovery-card.is-connected {
    border-color: #c5f3d7;
}

.setup-discovery-card h3 {
    color: #071437;
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 4px;
}

.setup-discovery-card p {
    color: #7e8299;
    line-height: 1.45;
    margin: 0;
}

.setup-discovery-summary {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 16px;
}

.setup-discovery-summary div {
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 8px;
    min-width: 0;
    padding: 12px;
}

.setup-discovery-summary span,
.setup-discovery-summary strong {
    display: block;
}

.setup-discovery-summary span {
    color: #99a1b7;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.setup-discovery-summary strong {
    color: #252f4a;
    font-size: 13px;
    font-weight: 800;
    margin-top: 3px;
    overflow-wrap: anywhere;
}

.setup-discovery-groups {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.setup-discovery-group {
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 8px;
    min-width: 0;
    padding: 12px;
}

.setup-discovery-group-title {
    align-items: center;
    color: #252f4a;
    display: flex;
    font-size: 13px;
    font-weight: 800;
    gap: 8px;
    margin-bottom: 10px;
}

.setup-discovery-group-title i {
    color: var(--ps-primary);
}

.setup-discovery-options {
    display: grid;
    gap: 6px;
    max-height: 174px;
    overflow: auto;
}

.setup-discovery-option {
    background: #f8fafd;
    border: 1px solid #eef0f4;
    border-radius: 8px;
    color: #252f4a;
    padding: 8px 10px;
    text-align: left;
    width: 100%;
}

.setup-discovery-option:hover {
    background: #eef6ff;
    border-color: #badcff;
}

.setup-discovery-option span,
.setup-discovery-option small {
    display: block;
}

.setup-discovery-option span {
    font-size: 13px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.setup-discovery-option small {
    color: #99a1b7;
    font-size: 11px;
    line-height: 1.35;
    margin-top: 2px;
}

.setup-discovery-empty {
    color: #99a1b7;
    font-size: 12px;
    font-weight: 700;
    padding: 8px;
}

[data-bs-theme="dark"] .ci-sidebar,
[data-bs-theme="dark"] .ci-topbar,
[data-bs-theme="dark"] .app-panel,
[data-bs-theme="dark"] .quote-chat,
[data-bs-theme="dark"] .ci-demo-hero,
[data-bs-theme="dark"] .ci-stat-card,
[data-bs-theme="dark"] .setup-notes,
[data-bs-theme="dark"] .auth-form.card,
[data-bs-theme="dark"] .about-card {
    background: #151922;
    border-color: #2b3040;
}

[data-bs-theme="dark"] .ci-client-card,
[data-bs-theme="dark"] .ci-demo-hero-visual,
[data-bs-theme="dark"] .ci-quote-flow-animation,
[data-bs-theme="dark"] .auth-security-note,
[data-bs-theme="dark"] .setup-preview,
[data-bs-theme="dark"] .code-note,
[data-bs-theme="dark"] .setup-elastic-note,
[data-bs-theme="dark"] .setup-discovery-card,
[data-bs-theme="dark"] .setup-discovery-summary div,
[data-bs-theme="dark"] .setup-discovery-group,
[data-bs-theme="dark"] .setup-discovery-option,
[data-bs-theme="dark"] .search-status-item,
[data-bs-theme="dark"] .master-table-summary,
[data-bs-theme="dark"] .master-flow-animation,
[data-bs-theme="dark"] .master-directory-item,
[data-bs-theme="dark"] .candidate-results,
[data-bs-theme="dark"] .chat-msg-assistant .quote-message-text {
    background: #1b202b;
    border-color: #2b3040;
}

[data-bs-theme="dark"] .quote-stage-flow-track,
[data-bs-theme="dark"] .quote-chat .card-header,
[data-bs-theme="dark"] .quote-chat .card-footer {
    border-color: #2b3040;
}

[data-bs-theme="dark"] .quote-stage-flow-track {
    background: #2b3040;
}

[data-bs-theme="dark"] .quote-chat-footer {
    background: #151922;
}

[data-bs-theme="dark"] .quote-text-entry {
    background: #1b202b;
    border-color: #2b3040;
}

[data-bs-theme="dark"] .quote-message-input {
    background: #151922;
    border-color: #3a4256 !important;
    color: #f5f8fa;
}

[data-bs-theme="dark"] .auth-visual {
    background: #111823;
}

[data-bs-theme="dark"] .ci-brand-link,
[data-bs-theme="dark"] .ci-topbar-title,
[data-bs-theme="dark"] .ci-client-name,
[data-bs-theme="dark"] .ci-demo-hero h1,
[data-bs-theme="dark"] .auth-brand,
[data-bs-theme="dark"] .auth-visual-content h1,
[data-bs-theme="dark"] .ci-stat-value,
[data-bs-theme="dark"] .ci-empty-state h3,
[data-bs-theme="dark"] .ci-chat-empty strong,
[data-bs-theme="dark"] .setup-section-title h2,
[data-bs-theme="dark"] .master-hero h1,
[data-bs-theme="dark"] .master-flow-step strong,
[data-bs-theme="dark"] .ci-quote-flow-step strong,
[data-bs-theme="dark"] .master-directory-item strong,
[data-bs-theme="dark"] .master-table-summary strong,
[data-bs-theme="dark"] .quote-text-label,
[data-bs-theme="dark"] .preview-totals .total {
    color: #f5f8fa;
}

[data-bs-theme="dark"] .ci-quote-flow-step span {
    background: #151922;
    border-color: #3a4256;
    box-shadow: none;
}

[data-bs-theme="dark"] .auth-proof-row span,
[data-bs-theme="dark"] .ci-client-initials,
[data-bs-theme="dark"] .master-flow-step span,
[data-bs-theme="dark"] .search-status-item span,
[data-bs-theme="dark"] .quote-stage-icon {
    background: #151922;
    border-color: #2b3040;
    color: #f5f8fa;
}

[data-bs-theme="dark"] .chat-msg-user .quote-message-text {
    background: #132337;
    border-color: #24476c;
}

[data-bs-theme="dark"] .process-step {
    background: #1b202b;
    border-color: #2b3040;
}

[data-bs-theme="dark"] .candidate-option:hover,
[data-bs-theme="dark"] .candidate-option.is-selected {
    background: #132337;
    border-color: #24476c;
}

[data-bs-theme="dark"] .quote-stage-active .quote-stage-icon {
    background: var(--ps-primary);
    border-color: var(--ps-primary);
}

[data-bs-theme="dark"] .quote-stage-done .quote-stage-icon {
    background: #50cd89;
    border-color: #50cd89;
}

[data-bs-theme="dark"] .quote-stage em {
    background: #132337;
    color: #8bbfff;
}

[data-bs-theme="dark"] .quote-stage-done em {
    background: #132b22;
    color: #65d99b;
}

[data-bs-theme="dark"] .process-intro-copy h2,
[data-bs-theme="dark"] .process-step strong,
[data-bs-theme="dark"] .about-hero h1,
[data-bs-theme="dark"] .about-card h2,
[data-bs-theme="dark"] .search-status-item strong,
[data-bs-theme="dark"] .setup-discovery-card h3,
[data-bs-theme="dark"] .setup-discovery-summary strong,
[data-bs-theme="dark"] .setup-discovery-group-title,
[data-bs-theme="dark"] .setup-discovery-option,
[data-bs-theme="dark"] .quote-stage strong,
[data-bs-theme="dark"] .candidate-main strong,
[data-bs-theme="dark"] .ci-flash strong,
[data-bs-theme="dark"] .quote-wizard-warning strong {
    color: #f5f8fa;
}

[data-bs-theme="dark"] .ci-flash span,
[data-bs-theme="dark"] .quote-wizard-warning,
[data-bs-theme="dark"] .quote-wizard-warning span,
[data-bs-theme="dark"] .candidate-option,
[data-bs-theme="dark"] .quote-message-text {
    color: #dce4f1;
}

[data-bs-theme="dark"] .master-table-summary span,
[data-bs-theme="dark"] .master-table-summary small {
    color: #dce4f1;
}

[data-bs-theme="dark"] .quote-text-help {
    color: #dce4f1;
}

[data-bs-theme="dark"] .ci-flash-error,
[data-bs-theme="dark"] .quote-wizard-warning {
    background: #2b1720;
    border-color: #803145;
    border-left-color: #f1416c;
}

[data-bs-theme="dark"] .ci-flash-success {
    background: #122b20;
    border-color: #2f7a55;
    border-left-color: #50cd89;
}

[data-bs-theme="dark"] .llm-key-current {
    background: #122b20;
    border-color: #2f7a55;
}

[data-bs-theme="dark"] .llm-key-current > span {
    background: #151922;
    color: #50cd89;
}

[data-bs-theme="dark"] .llm-key-current strong {
    color: #f5f8fa;
}

[data-bs-theme="dark"] .llm-key-current small {
    color: #dce4f1;
}

[data-bs-theme="dark"] .ci-flash-info {
    background: #132337;
    border-color: #24476c;
    border-left-color: var(--ps-primary);
}

[data-bs-theme="dark"] .setup-discovery-option:hover {
    background: #132337;
    border-color: #24476c;
}

[data-bs-theme="dark"] .auth-form-centered {
    background: rgba(21, 25, 34, .94);
}

@media (max-width: 1600px) {
    .quote-layout {
        grid-template-columns: 1fr;
    }

    .quote-chat {
        height: auto;
        max-height: none;
        position: static;
    }

    .quote-chat-body {
        max-height: 460px;
    }
}

@media (max-height: 820px) and (min-width: 1601px) {
    .quote-chat .card-header {
        padding-bottom: 14px !important;
        padding-top: 14px !important;
    }

    .quote-chat-body {
        padding-bottom: 14px !important;
        padding-top: 14px !important;
    }

    .quote-chat-footer {
        padding-bottom: 14px !important;
        padding-top: 14px !important;
    }

    .quote-text-entry {
        padding: 12px;
    }

    .quote-message-input {
        min-height: 86px;
    }

    .quote-text-help {
        font-size: 11px;
        margin-top: 7px;
    }

    .demo-image-form {
        margin-top: 10px;
        padding-top: 10px;
    }
}

@media (max-width: 1280px) {
    .quote-layout,
    .setup-grid,
    .ci-demo-hero,
    .settings-layout,
    .demo-data-layout,
    .process-intro,
    .master-hero,
    .master-directory,
    .master-table-grid,
    .quote-stage-wizard,
    .setup-discovery-summary,
    .setup-discovery-groups,
    .search-status-grid {
        grid-template-columns: 1fr;
    }

    .setup-notes,
    .quote-chat {
        height: auto;
        max-height: none;
        position: static;
    }

    .setup-notes {
        min-height: 620px;
    }

    .quote-chat {
        min-height: 0;
    }

    .quote-stage-flow-track {
        display: none;
    }
}

@media (max-width: 992px) {
    .ci-sidebar {
        box-shadow: 0 16px 40px rgba(15, 23, 42, .18);
        left: 0;
        position: fixed;
        top: 0;
        transform: translateX(-105%);
        transition: transform .2s ease;
    }

    .ci-shell.ci-sidebar-open .ci-sidebar {
        transform: translateX(0);
    }

    .ci-shell.ci-sidebar-open .ci-sidebar-backdrop {
        background: rgba(15, 23, 42, .35);
        display: block;
        inset: 0;
        position: fixed;
        z-index: 18;
    }

    .ci-topbar {
        padding: 0 18px;
    }

    .ci-content {
        padding: 18px;
    }

    .ci-company-pill {
        display: none;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-visual {
        min-height: 520px;
        padding: 28px;
    }

    .auth-panel {
        align-items: flex-start;
        min-height: 520px;
        padding: 86px 24px 32px;
    }
}

@media (max-width: 640px) {
    .ci-demo-hero,
    .app-panel,
    .ci-stat-card,
    .setup-main,
    .setup-notes,
    .master-list-toolbar,
    .master-table-summary,
    .master-pagination {
        padding: 16px;
    }

    .panel-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .master-list-toolbar,
    .master-table-summary,
    .master-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .master-search {
        width: 100%;
    }

    .quote-stage {
        align-items: flex-start;
        flex-direction: row;
        justify-content: flex-start;
        min-height: auto;
        text-align: left;
    }

    .quote-stage-icon {
        flex-basis: 48px;
        height: 48px;
        width: 48px;
    }

    .ci-topbar-actions {
        gap: 6px;
    }

    .ci-topbar-actions .btn:not(.btn-icon) {
        padding-left: 10px;
        padding-right: 10px;
    }

    .ci-demo-hero h1,
    .auth-visual-content h1 {
        font-size: 28px;
    }

    .auth-visual {
        min-height: 500px;
    }

    .auth-enterprise-brand {
        left: 20px;
        top: 20px;
    }

    .auth-enterprise .auth-toolbar {
        right: 20px;
        top: 20px;
    }

    .auth-enterprise-shell {
        padding: 86px 16px 24px;
    }

    .process-steps {
        grid-template-columns: 1fr;
    }

    .quote-candidate-control {
        min-width: 240px;
    }

    .master-flow-animation {
        grid-template-columns: 1fr;
    }

    .master-flow-track {
        bottom: 42px;
        height: auto;
        left: 48px;
        right: auto;
        top: 42px;
        width: 6px;
    }

    .master-flow-track span {
        animation-name: masterFlowBarY;
        transform-origin: center top;
    }
}

@keyframes masterFlowBarY {
    0% {
        transform: scaleY(.06);
    }
    36% {
        transform: scaleY(.5);
    }
    72%,
    100% {
        transform: scaleY(1);
    }
}
