html, body {
    height: 100%;
}

.nexus-logon-error {
    align-items: center;
    display: flex;
    gap: 0.35rem;
    margin: 0.75rem 0 0.25rem;
}

.ErrorImage {
    background-color: #c00000;
    border-radius: 50%;
    display: inline-block;
    flex: 0 0 16px;
    height: 16px;
    position: relative;
    width: 16px;
}

.ErrorImage::before,
.ErrorImage::after {
    background-color: #ffffff;
    content: "";
    height: 10px;
    left: 7px;
    position: absolute;
    top: 3px;
    width: 2px;
}

.ErrorImage::before {
    transform: rotate(45deg);
}

.ErrorImage::after {
    transform: rotate(-45deg);
}

.ErrorLabel {
    color: #c00000;
    font-size: 0.875rem;
}

app {
    box-sizing: border-box;
    display: block;
    height: 100%;
    width: 100%;
}

/* A native DetailView conversation is a real right-hand column: reserve the same width on the app
   canvas so the XAF detail remains fully usable instead of being covered by floating chrome. */
body:has(.ai-conversation-detail-dock) > app {
    padding-right: min(32rem, 38vw);
}

@media (max-width: 900px) {
    body:has(.ai-conversation-detail-dock) > app {
        padding-right: 0;
    }
}

.agent-chat-suggested-edit {
    align-items: flex-start;
    background: #f7f3fa;
    border: 1px solid #decbe5;
    border-radius: 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.75rem;
}

.agent-chat-suggested-edit-value {
    color: #2d1633;
    font-weight: 600;
}

.agent-chat-suggested-edit-apply {
    background: #7b238c;
    border: 0;
    border-radius: 0.45rem;
    color: #fff;
    cursor: pointer;
    padding: 0.45rem 0.75rem;
}

.agent-chat-suggested-edit-apply:disabled {
    cursor: default;
    opacity: 0.65;
}

.agent-chat-suggested-edit-denied {
    color: #8a3d15;
    font-size: 0.8rem;
}

.agent-chat-suggested-classification {
    align-items: flex-start;
    background: #f7f3fa;
    border: 1px solid #decbe5;
    border-radius: 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.75rem;
}

.agent-chat-suggested-classification-line {
    color: #2d1633;
    font-weight: 600;
}

.agent-chat-suggested-classification-apply {
    background: #7b238c;
    border: 0;
    border-radius: 0.45rem;
    color: #fff;
    cursor: pointer;
    padding: 0.45rem 0.75rem;
}

.agent-chat-suggested-classification-apply:disabled {
    cursor: default;
    opacity: 0.65;
}

.agent-chat-suggested-classification-denied {
    color: #8a3d15;
    font-size: 0.8rem;
}

/* Grid-originated dashboard detail iframes use the host shell's Back to Dashboard button. */
body.nexus-dashboard-detail .navigate-back-icon-container[data-action-name="Back"],
body.nexus-dashboard-detail button.navigate-back-icon-container,
body.nexus-dashboard-detail .xaf-action.navigate-back-icon-container {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.header-logo {
    background-image: url('../images/Verto_Logo.svg');
    background-position: left;
    background-repeat: no-repeat;
    background-size: contain;
    width: 320px;
    height: 42px;
    margin: 0 auto;
}

#blazor-error-ui {
    background: inherit;
    bottom: 0;
    display: none;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 100001;
}

/* Delay the global error overlay so transient circuit reconnects do not flash it. */
#blazor-error-ui[style*="display: block"] {
    animation: blazor-error-ui-reveal 0.01s linear 2s forwards;
}

@keyframes blazor-error-ui-reveal {
    to {
        opacity: 1;
        pointer-events: auto;
    }
}

/* ============================================
   AI Chat Panel Styles
   ============================================ */

.ai-chat-panel {
    position: fixed;
    bottom: 100px; /* Increased from 20px to avoid XAF pagination controls */
    right: 20px;
    z-index: 1000;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

.ai-chat-toggle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

.ai-chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.ai-chat-icon {
    width: 28px;
    height: 28px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    border: 2px solid white;
}

.ai-chat-dialog {
    position: absolute;
    bottom: 80px; /* Dialog appears above the toggle button */
    right: 0;
    width: 400px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 220px); /* Adjusted to account for higher button position */
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-chat-panel.open .ai-chat-dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.ai-chat-header {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-chat-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-chat-header-icon {
    width: 24px;
    height: 24px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-chat-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.ai-chat-status {
    margin: 4px 0 0 0;
    font-size: 0.75rem;
    opacity: 0.9;
}

.ai-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-chat-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
}

.ai-chat-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}

.ai-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.ai-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.ai-chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.ai-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.ai-chat-welcome {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.ai-chat-welcome-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.ai-chat-welcome h4 {
    margin: 0 0 8px 0;
    color: #1e293b;
    font-size: 1.2rem;
}

.ai-chat-welcome p {
    margin: 0 0 24px 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.ai-chat-message {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ai-chat-message.user {
    align-items: flex-end;
}

.ai-chat-message.assistant {
    align-items: flex-start;
}

.ai-chat-message-content {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 80%;
}

.ai-chat-message.user .ai-chat-message-content {
    flex-direction: row-reverse;
}

.ai-chat-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    padding: 6px;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.ai-chat-message-avatar svg {
    width: 100%;
    height: 100%;
    color: white;
}

.ai-chat-message-avatar.user {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.ai-chat-message-text {
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    word-wrap: break-word;
    line-height: 1.6;
    font-size: 0.9rem;
    color: #1e293b;
}

/* Formatted text styles */
.ai-chat-message-text strong {
    font-weight: 600;
    color: #1e293b;
}

.ai-chat-message-text em {
    font-style: italic;
    color: #475569;
}

.ai-chat-message.user .ai-chat-message-text {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.ai-chat-message-time {
    font-size: 0.75rem;
    color: #94a3b8;
    padding: 0 8px;
    margin-top: 4px;
}

.ai-chat-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.ai-chat-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    animation: typing 1.4s infinite;
}

.ai-chat-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-chat-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.ai-chat-input-container {
    border-top: 1px solid #e2e8f0;
    background: white;
    padding: 16px;
}

.ai-chat-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.ai-chat-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: none;
    max-height: 120px;
    overflow-y: auto;
    transition: all 0.2s ease;
}

.ai-chat-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ai-chat-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.ai-chat-send:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.ai-chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   WS4.6 Agent-chat kit (AgentChatSurface)
   Skins the re-platformed chat surface to match
   the legacy .ai-chat-* look. Class hooks come
   from Components/AgentChat/*.razor.
   ============================================ */

.agent-chat-surface {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.agent-chat-transcript {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 20px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}

.agent-chat-transcript::-webkit-scrollbar { width: 6px; }
.agent-chat-transcript::-webkit-scrollbar-track { background: transparent; }
.agent-chat-transcript::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.agent-chat-transcript::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Empty-state welcome — the kit renders no children when there are no messages,
   so the welcome is provided here for the empty transcript. */
.agent-chat-transcript:empty {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.agent-chat-transcript:empty::before {
    content: "\1F4AC";
    font-size: 44px;
    margin-bottom: 12px;
}

.agent-chat-transcript:empty::after {
    content: "Welcome to AI Assistant\A How can I help?";
    white-space: pre-line;
    line-height: 1.8;
    font-size: 0.95rem;
    color: #64748b;
}

/* A host that supplies its own empty state (the end-user portal greeting) owns that space; the kit's
   generic welcome must not render underneath it. */
.ai-chat-panel-has-empty-state .agent-chat-transcript:empty::before,
.ai-chat-panel-has-empty-state .agent-chat-transcript:empty::after {
    content: none;
}

/* Layout for the host-supplied empty state itself, above the composer. */
.ai-chat-empty-state {
    display: grid;
    gap: 22px;
    padding: 28px 24px 8px;
}

/* Message rows: [avatar] [body] (row-reverse for the user) */
.agent-chat-message {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
    max-width: 88%;
}

.agent-chat-message.user { align-self: flex-end; flex-direction: row-reverse; }
.agent-chat-message.assistant { align-self: flex-start; }

.agent-chat-avatar {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 50%;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.agent-chat-avatar svg { width: 100%; height: 100%; }

.agent-chat-message-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.agent-chat-message.user .agent-chat-message-body { align-items: flex-end; }
.agent-chat-message.assistant .agent-chat-message-body { align-items: flex-start; }

.agent-chat-message-text {
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    word-wrap: break-word;
    white-space: pre-wrap;
    line-height: 1.6;
    font-size: 0.9rem;
    color: #1e293b;
}

.agent-chat-message.user .agent-chat-message-text {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.agent-chat-knowledge-sources {
    width: min(100%, 34rem);
    margin-top: 4px;
    padding: 10px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    background: #eff6ff;
}

.agent-chat-knowledge-sources-heading {
    margin: 0 0 6px;
    color: #1e3a8a;
    font-size: 0.8rem;
}

.agent-chat-knowledge-sources-list {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.agent-chat-knowledge-source {
    display: grid;
    gap: 2px;
    color: #1e293b;
    font-size: 0.82rem;
}

.agent-chat-knowledge-source-title,
.agent-chat-knowledge-source-link {
    overflow-wrap: anywhere;
    font-weight: 600;
}

.agent-chat-knowledge-source-link {
    color: #1d4ed8;
}

.agent-chat-knowledge-source-metadata {
    display: flex;
    gap: 8px;
    color: #475569;
    font-size: 0.76rem;
}

.agent-chat-knowledge-source-confidence {
    color: #1e40af;
    font-weight: 600;
}

/* Structured query-result affordances: deep-links / see-all / clarification */
.agent-chat-deep-links,
.agent-chat-clarification-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.agent-chat-see-all,
.agent-chat-clarification { margin-top: 8px; }

.agent-chat-clarification-intro {
    margin: 0 0 6px 0;
    font-size: 0.85rem;
    color: #475569;
}

.agent-chat-deep-link,
.agent-chat-see-all-button,
.agent-chat-clarification-choice {
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.agent-chat-deep-link:hover,
.agent-chat-see-all-button:hover,
.agent-chat-clarification-choice:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

/* Input row */
.agent-chat-input {
    display: flex;
    gap: 8px;
    align-items: center;
    border-top: 1px solid #e2e8f0;
    background: white;
    padding: 16px;
}

.agent-chat-input-box {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-family: inherit;
    color: #1e293b;
    transition: all 0.2s ease;
}

.agent-chat-input-box:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.agent-chat-input-box:disabled { background: #f8fafc; cursor: not-allowed; }

.agent-chat-send {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.agent-chat-send svg { width: 18px; height: 18px; }

.agent-chat-send:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transform: scale(1.06);
}

.agent-chat-send:disabled { opacity: 0.5; cursor: not-allowed; }

/* Voice mic sits at the leading edge of the kit input row (host-injected). */
.agent-chat-input .ai-chat-voice-btn { margin-right: 2px; }

/* Conversation rail overrides: every mounted chat is part of host layout, never floating chrome. */
.ai-chat-panel.ai-chat-panel-docked {
    position: static;
    inset: auto;
    z-index: auto;
    width: 100%;
    min-height: 0;
}

.ai-chat-panel.ai-chat-panel-inline {
    position: static;
    inset: auto;
    z-index: auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    color: #0f172a;
}

.ai-chat-panel.ai-chat-panel-inline .ai-chat-inline-header {
    flex: 0 0 auto;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}

.ai-chat-panel.ai-chat-panel-inline .ai-chat-inline-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 650;
    color: #0f172a;
}

/* Grounding chip: names the item a portal conversation is pinned to, with an inline clear affordance. */
.ai-chat-grounding-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #8A1FA0;
    background: #F6ECF9;
    border: 1px solid #E3CBEC;
    border-radius: 999px;
    padding: 3px 10px 3px 8px;
}

.ai-chat-grounding-chip button {
    background: none;
    border: 0;
    color: inherit;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
}

.ai-chat-panel.ai-chat-panel-inline .ai-chat-status {
    color: #475569;
    opacity: 1;
}

.ai-chat-panel.ai-chat-panel-inline .agent-chat-surface {
    flex: 1 1 auto;
    min-height: 0;
}

.ai-chat-panel.ai-chat-panel-inline .agent-chat-transcript {
    padding: 16px;
    gap: 18px;
    background: #ffffff;
}

.ai-chat-panel.ai-chat-panel-inline .agent-chat-busy {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    align-self: flex-start;
    margin: 0.4rem 1rem 0;
    color: #5d5263;
    font-size: 0.875rem;
}

.ai-chat-panel.ai-chat-panel-inline .agent-chat-busy-mark {
    width: 1.5rem;
    height: 1.5rem;
    animation: verto-working-pulse 1.4s ease-in-out infinite;
}

@keyframes verto-working-pulse {
    0%, 100% { transform: scale(0.94); opacity: 0.62; }
    50% { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .ai-chat-panel.ai-chat-panel-inline .agent-chat-busy-mark {
        animation: none;
        transform: none;
        opacity: 1;
    }
}

.ai-chat-panel.ai-chat-panel-inline .agent-chat-input-inline {
    position: sticky;
    bottom: 0;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    align-items: flex-end;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.ai-chat-panel.ai-chat-panel-inline .agent-chat-input-inline:focus-within {
    border-color: #4a2661;
    box-shadow: 0 0 0 3px rgba(74, 38, 97, 0.18), 0 2px 8px rgba(15, 23, 42, 0.08);
}

.ai-chat-panel.ai-chat-panel-inline .agent-chat-input-inline .agent-chat-input-box {
    min-width: 0;
    min-height: 2.75rem;
    max-height: 128px;
    padding: 0.625rem 0.25rem;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    resize: none;
}

.ai-chat-panel.ai-chat-panel-inline .agent-chat-input-inline .agent-chat-input-box:focus {
    border-color: transparent;
    box-shadow: none;
}

.ai-chat-panel.ai-chat-panel-inline .agent-chat-input-inline .ai-chat-voice-btn-inline,
.ai-chat-panel.ai-chat-panel-inline .agent-chat-input-inline .agent-chat-send {
    display: inline-flex;
    flex: 0 0 2.5rem;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: 0.75rem;
}

.ai-chat-panel.ai-chat-panel-inline .agent-chat-input-inline .agent-chat-send {
    background: #4a2661;
}

.ai-chat-panel.ai-chat-panel-inline .agent-chat-input-inline .ai-chat-voice-btn-inline.recording {
    color: #ffffff;
}

.ai-chat-panel.ai-chat-panel-inline .agent-chat-input-inline .ai-chat-voice-btn-inline:focus-visible,
.ai-chat-panel.ai-chat-panel-inline .agent-chat-input-inline .agent-chat-send:focus-visible {
    outline: 3px solid rgba(74, 38, 97, 0.35);
    outline-offset: 2px;
}

.ai-chat-panel.ai-chat-panel-inline .agent-chat-input-inline .ai-chat-voice-btn-inline:disabled,
.ai-chat-panel.ai-chat-panel-inline .agent-chat-input-inline .agent-chat-send:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.ai-chat-panel.ai-chat-panel-inline .agent-chat-input-inline .ai-chat-voice-icon,
.ai-chat-panel.ai-chat-panel-inline .agent-chat-input-inline .agent-chat-send-icon-up {
    width: 1.2rem;
    height: 1.2rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.ai-chat-panel.ai-chat-panel-inline .agent-chat-message-metadata {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 4px;
    font-size: 0.72rem;
    color: #64748b;
}

.ai-chat-panel.ai-chat-panel-inline .agent-chat-markdown {
    white-space: normal;
}

.ai-chat-panel.ai-chat-panel-inline .agent-chat-markdown h1,
.ai-chat-panel.ai-chat-panel-inline .agent-chat-markdown h2,
.ai-chat-panel.ai-chat-panel-inline .agent-chat-markdown h3,
.ai-chat-panel.ai-chat-panel-inline .agent-chat-markdown h4 {
    margin: 10px 0 4px;
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.ai-chat-panel.ai-chat-panel-inline .agent-chat-markdown h3 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
}

.ai-chat-panel.ai-chat-panel-inline .agent-chat-markdown p {
    margin: 0 0 8px;
}

.ai-chat-panel.ai-chat-panel-inline .agent-chat-markdown ul,
.ai-chat-panel.ai-chat-panel-inline .agent-chat-markdown ol {
    margin: 0 0 8px;
    padding-left: 20px;
}

.ai-chat-panel.ai-chat-panel-inline .agent-chat-markdown li {
    margin-bottom: 2px;
}

.ai-chat-panel.ai-chat-panel-inline .agent-chat-markdown code {
    padding: 1px 4px;
    border-radius: 3px;
    background: #f3f4f6;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 12px;
}

.ai-chat-panel.ai-chat-panel-inline .agent-chat-markdown pre {
    margin: 6px 0;
    padding: 8px 10px;
    overflow-x: auto;
    border-radius: 4px;
    background: #f3f4f6;
}

.ai-chat-panel.ai-chat-panel-inline .agent-chat-markdown pre code {
    padding: 0;
    background: transparent;
}

.ai-chat-panel.ai-chat-panel-inline .agent-chat-markdown table {
    width: 100%;
    margin: 6px 0;
    border-collapse: collapse;
    font-size: 12px;
}

.ai-chat-panel.ai-chat-panel-inline .agent-chat-markdown th,
.ai-chat-panel.ai-chat-panel-inline .agent-chat-markdown td {
    padding: 4px 8px;
    border: 1px solid #e5e7eb;
    text-align: left;
}

.ai-chat-panel.ai-chat-panel-inline .agent-chat-markdown th {
    background: #f9fafb;
    font-weight: 600;
}

.ai-chat-panel.ai-chat-panel-inline .agent-chat-markdown a {
    color: #2563eb;
    text-decoration: underline;
}

/* End User Portal: conversation chrome follows portal tokens so browser dark mode
   does not leave slate text on a darkened surface. */
.portal-frame .ai-chat-panel.ai-chat-panel-inline,
.portal-frame .ai-chat-panel.ai-chat-panel-inline .ai-chat-inline-header,
.portal-frame .ai-chat-panel.ai-chat-panel-inline .agent-chat-transcript,
.portal-frame .ai-chat-panel.ai-chat-panel-inline .agent-chat-input-inline,
.portal-frame .ai-chat-aux-controls {
    background: var(--surface, #F1F1F5);
    color: var(--ink, #281637);
    border-color: var(--border, #DCDCE4);
}

.portal-frame .ai-chat-panel.ai-chat-panel-inline .ai-chat-inline-title,
.portal-frame .ai-chat-panel.ai-chat-panel-inline .ai-chat-status,
.portal-frame .ai-chat-panel.ai-chat-panel-inline .agent-chat-busy,
.portal-frame .ai-chat-panel.ai-chat-panel-inline .agent-chat-message-metadata,
.portal-frame .ai-chat-panel.ai-chat-panel-inline .agent-chat-markdown h1,
.portal-frame .ai-chat-panel.ai-chat-panel-inline .agent-chat-markdown h2,
.portal-frame .ai-chat-panel.ai-chat-panel-inline .agent-chat-markdown h4 {
    color: var(--ink, #281637);
}

.portal-frame .ai-chat-panel.ai-chat-panel-inline .agent-chat-markdown h3,
.portal-frame .portal-composer-hint {
    color: var(--muted, #757690);
}

.portal-frame .agent-chat-message.assistant .agent-chat-message-text {
    background: var(--card, #FDFDFD);
    color: var(--ink, #281637);
}

.portal-frame .ai-chat-panel.ai-chat-panel-inline .agent-chat-input-inline .agent-chat-input-box,
.portal-frame .agent-chat-input-box {
    background: transparent;
    color: var(--ink, #281637);
    caret-color: var(--ink, #281637);
}

.portal-frame .ai-chat-panel.ai-chat-panel-inline .agent-chat-input-inline .agent-chat-input-box::placeholder,
.portal-frame .agent-chat-input-box::placeholder {
    color: var(--muted, #757690);
}

.portal-frame .ai-chat-panel.ai-chat-panel-inline .agent-chat-input-inline .ai-chat-voice-btn-inline {
    color: var(--ink, #281637);
    background: transparent;
}

.portal-frame .ai-chat-panel.ai-chat-panel-inline .agent-chat-markdown code,
.portal-frame .ai-chat-panel.ai-chat-panel-inline .agent-chat-markdown pre {
    background: var(--card-2, #F7F7FA);
    color: var(--ink, #281637);
}

.portal-frame .ai-chat-panel.ai-chat-panel-inline .agent-chat-markdown th,
.portal-frame .ai-chat-panel.ai-chat-panel-inline .agent-chat-markdown td {
    border-color: var(--border, #DCDCE4);
    color: var(--ink, #281637);
}

.portal-frame .ai-chat-panel.ai-chat-panel-inline .agent-chat-markdown th {
    background: var(--card-2, #F7F7FA);
}

.portal-frame .ai-chat-panel.ai-chat-panel-inline .agent-chat-markdown a {
    color: var(--action-text, #8A1FA0);
}

.portal-frame .ai-chat-grounding-chip {
    color: var(--action-text, #8A1FA0);
    background: var(--action-tint, #F6ECF9);
    border-color: var(--action-line, #E3CBEC);
}

@media (prefers-color-scheme: dark) {
    .portal-frame .ai-chat-panel.ai-chat-panel-inline .agent-chat-input-inline {
        box-shadow: none;
    }

    .portal-frame .ai-chat-panel.ai-chat-panel-inline .agent-chat-input-inline:focus-within {
        border-color: var(--action, #B23DC9);
        box-shadow: 0 0 0 3px rgba(178, 61, 201, 0.35);
    }
}

/* Auxiliary row below the kit (Agent Mode toggle). */
.ai-chat-aux-controls {
    display: flex;
    align-items: center;
    padding: 10px 16px 14px;
    background: white;
}

/* ============================================
   Quick Actions Panel Styles
   ============================================ */

.ai-chat-quick-actions {
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.ai-chat-quick-actions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    transition: background-color 0.2s;
}

.ai-chat-quick-actions-header:hover {
    background-color: #f1f5f9;
}

.ai-chat-quick-actions-header-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-chat-quick-actions-icon {
    width: 20px;
    height: 20px;
    color: #3b82f6;
    flex-shrink: 0;
}

.ai-chat-quick-actions-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e293b;
}

.ai-chat-quick-actions-chevron {
    width: 16px;
    height: 16px;
    color: #64748b;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.ai-chat-quick-actions-chevron.expanded {
    transform: rotate(180deg);
}

.ai-chat-quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 8px 12px;
}

.ai-chat-quick-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.75rem;
    font-weight: 500;
    color: #1e293b;
    text-align: left;
    min-height: 32px;
}

.ai-chat-quick-action-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ai-chat-quick-action-btn:active:not(:disabled) {
    transform: translateY(0);
}

.ai-chat-quick-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ai-chat-action-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    object-fit: contain;
}

/* Color variants for action buttons */
.ai-chat-action-orange {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #c2410c;
}

.ai-chat-action-orange:hover:not(:disabled) {
    background: #ffedd5;
    border-color: #fdba74;
}

.ai-chat-action-yellow {
    background: #fefce8;
    border-color: #fde047;
    color: #854d0e;
}

.ai-chat-action-yellow:hover:not(:disabled) {
    background: #fef9c3;
    border-color: #facc15;
}

.ai-chat-action-green {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
}

.ai-chat-action-green:hover:not(:disabled) {
    background: #dcfce7;
    border-color: #4ade80;
}

.ai-chat-action-purple {
    background: #faf5ff;
    border-color: #c084fc;
    color: #6b21a8;
}

.ai-chat-action-purple:hover:not(:disabled) {
    background: #f3e8ff;
    border-color: #a855f7;
}

.ai-chat-action-light-green {
    background: #f0fdfa;
    border-color: #5eead4;
    color: #134e4a;
}

.ai-chat-action-light-green:hover:not(:disabled) {
    background: #ccfbf1;
    border-color: #2dd4bf;
}

/* ============================================
   Voice Input Button Styles
   ============================================ */

.ai-chat-voice-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ai-chat-voice-btn:hover:not(:disabled) {
    background: #e2e8f0;
}

.ai-chat-voice-btn.recording {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #dc2626;
    animation: recording-pulse 1.5s infinite;
}

.ai-chat-voice-btn.recording span {
    filter: brightness(10);
}

@keyframes recording-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

/* ============================================
   Agent Mode Toggle (Mini)
   ============================================ */

.ai-chat-agent-toggle {
    padding: 8px 12px;
    border-top: 1px solid #f1f5f9;
}

.ai-agent-mini-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.75rem;
    color: #64748b;
}

.ai-agent-mini-toggle input {
    display: none;
}

.ai-agent-mini-slider {
    width: 32px;
    height: 18px;
    background: #cbd5e1;
    border-radius: 9px;
    position: relative;
    transition: background 0.2s;
}

.ai-agent-mini-slider::after {
    content: '';
    position: absolute;
    left: 2px;
    top: 2px;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.ai-agent-mini-toggle input:checked + .ai-agent-mini-slider {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
}

.ai-agent-mini-toggle input:checked + .ai-agent-mini-slider::after {
    transform: translateX(14px);
}

.ai-agent-mini-label {
    -webkit-user-select: none;
    user-select: none;
}

/* ============================================
   Navigation Button and Entity Link Styles
   ============================================ */

.ai-chat-navigation-link {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.ai-chat-nav-button {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.ai-chat-nav-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.ai-chat-nav-button:active {
    transform: translateY(0);
}

.ai-chat-entity-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
}

.ai-chat-entity-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

.ai-chat-entity-link:visited {
    color: #6366f1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ai-chat-panel {
        bottom: 80px; /* Higher on mobile to avoid pagination */
    }
    
    .ai-chat-dialog {
        width: calc(100vw - 20px);
        right: 10px;
        bottom: 80px;
        height: calc(100vh - 180px);
    }
    
    .ai-chat-toggle {
        width: 50px;
        height: 50px;
    }
}

/* ============================================================
   AI Comment Cards
   Rich HTML rendering for AI-generated comments in the
   incident Comments collection. These classes are referenced
   by IncidentResultStrategy via AiCommentHtmlBuilder.
   ============================================================ */

.ai-comment-card {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin: 4px 0;
    background: #fff;
    font-size: 0.875rem;
    line-height: 1.5;
}

.ai-comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #f0f4ff 0%, #eef2ff 100%);
    border-bottom: 1px solid #e0e7ff;
    color: #3730a3;
    font-weight: 600;
    font-size: 0.82rem;
}

.ai-comment-header-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.ai-comment-header-title {
    flex: 1;
}

.ai-comment-confidence {
    background: rgba(99, 102, 241, 0.12);
    color: #4f46e5;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 500;
    white-space: nowrap;
}

.ai-comment-body {
    padding: 12px 14px;
}

.ai-comment-section {
    margin-bottom: 12px;
}

.ai-comment-section:last-child {
    margin-bottom: 0;
}

.ai-comment-section-title {
    font-weight: 600;
    font-size: 0.78rem;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid #f1f5f9;
}

.ai-comment-text {
    color: #475569;
    white-space: pre-wrap;
}

.ai-comment-field-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
    align-items: baseline;
}

.ai-comment-field-label {
    font-weight: 600;
    color: #334155;
    font-size: 0.82rem;
    white-space: nowrap;
}

.ai-comment-field-value {
    color: #475569;
    font-size: 0.82rem;
}

.ai-comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ai-comment-list li {
    padding: 3px 0 3px 16px;
    position: relative;
    color: #475569;
}

.ai-comment-list li::before {
    content: '\2022';
    position: absolute;
    left: 4px;
    color: #94a3b8;
    font-weight: bold;
}

.ai-comment-list-numbered {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: ai-step;
}

.ai-comment-list-numbered li {
    padding: 3px 0 3px 24px;
    position: relative;
    color: #475569;
    counter-increment: ai-step;
}

.ai-comment-list-numbered li::before {
    content: counter(ai-step) '.';
    position: absolute;
    left: 4px;
    color: #6366f1;
    font-weight: 600;
    font-size: 0.82rem;
}

.ai-comment-tag {
    display: inline-block;
    background: #e0e7ff;
    color: #3730a3;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 500;
    margin: 2px 4px 2px 0;
}

/* Draft response copy block */
.ai-comment-draft-block {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    position: relative;
}

.ai-comment-draft-text {
    color: #1e293b;
    white-space: pre-wrap;
}

.ai-comment-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e0e7ff;
    color: #3730a3;
    border: none;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s;
}

.ai-comment-copy-btn:hover {
    background: #c7d2fe;
    color: #312e81;
}

.ai-comment-copy-btn.copied {
    background: #d1fae5;
    color: #065f46;
}

/* KB article cards */
.ai-comment-article {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: #fafbfc;
}

.ai-comment-article:last-child {
    margin-bottom: 0;
}

.ai-comment-article-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.ai-comment-article-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.85rem;
    flex: 1;
}

.ai-comment-relevance {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: #64748b;
}

.ai-comment-relevance-bar {
    width: 48px;
    height: 5px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.ai-comment-relevance-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

.ai-comment-article-reason {
    font-size: 0.78rem;
    color: #64748b;
    font-style: italic;
    margin-bottom: 4px;
}

.ai-comment-article-excerpt {
    font-size: 0.82rem;
    color: #475569;
    margin-bottom: 6px;
}

.ai-comment-article-link {
    color: #3b82f6;
    font-size: 0.78rem;
    text-decoration: none;
}

.ai-comment-article-link:hover {
    text-decoration: underline;
}

/* Promotion success card */
.ai-comment-card.ai-comment-success {
    border-color: #a7f3d0;
}

.ai-comment-card.ai-comment-success .ai-comment-header {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-bottom-color: #a7f3d0;
    color: #065f46;
}

/* Warning / error state */
.ai-comment-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 0.78rem;
    color: #92400e;
    margin-top: 8px;
}

.ai-comment-note {
    font-size: 0.78rem;
    color: #94a3b8;
    font-style: italic;
    margin-top: 8px;
}

/* ============================================================
   AI Guidance Banner
   Informational callout injected above comment grids when
   AI-generated comment cards are present. Dismissible via JS
   with state persisted to sessionStorage.
   ============================================================ */

.ai-guidance-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    font-size: 0.82rem;
    color: #3730a3;
    line-height: 1.45;
    animation: ai-banner-slide-in 0.3s ease-out;
}

@keyframes ai-banner-slide-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-guidance-banner-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.ai-guidance-banner-text {
    flex: 1;
}

.ai-guidance-banner-text strong {
    font-weight: 600;
}

.ai-guidance-banner-dismiss {
    background: none;
    border: none;
    color: #6366f1;
    cursor: pointer;
    font-size: 1rem;
    padding: 0 2px;
    line-height: 1;
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.ai-guidance-banner-dismiss:hover {
    opacity: 1;
}

/* ============================================================
   AI Comment Filter Controls
   Toggle bar injected by JS above comment grids to allow
   filtering between All / Human / AI comments.
   ============================================================ */

.ai-filter-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    font-size: 0.8rem;
}

.ai-filter-bar-label {
    color: #64748b;
    font-weight: 500;
    margin-right: 2px;
}

.ai-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.ai-filter-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.ai-filter-btn.active {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
}

.ai-filter-btn .ai-filter-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 0.72rem;
}

.ai-filter-btn.active .ai-filter-count {
    background: rgba(255, 255, 255, 0.25);
}

/* Hide comment rows when JS filtering is active */
.ai-filter-hidden {
    display: none !important;
}

/* ============================================
   Hybrid Lookup Editor Styles
   ============================================ */

.hybrid-lookup {
    width: 100%;
}

.hybrid-lookup .dx-edit-button,
.hybrid-lookup .dx-editor-button,
.hybrid-lookup .dx-dropdown-button {
    background: transparent !important;
    border: none !important;
    color: #64748b !important;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.hybrid-lookup .dx-edit-button:hover,
.hybrid-lookup .dx-editor-button:hover,
.hybrid-lookup .dx-dropdown-button:hover {
    color: #3b82f6 !important;
    opacity: 1;
    transform: scale(1.1);
}

.hybrid-lookup .dx-edit-button:active,
.hybrid-lookup .dx-editor-button:active {
    transform: scale(0.9);
}

/* Specific styling for the integrated look */
.hybrid-lookup .dxbs-text-edit,
.hybrid-lookup .dx-text-editor {
    border-radius: 8px !important;
    overflow: hidden;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.hybrid-lookup .dx-text-editor-input-container {
    padding-left: 4px !important;
}

.hybrid-lookup .dx-text-editor:focus-within {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* Overlay only the tab page body so headers stay clickable while nested content initializes. */
.verto-tab-loading [role="tabpanel"],
.verto-tab-loading .dxbl-tabs-content,
.verto-tab-loading .dxbl-fl-tab-page {
    position: relative;
    min-height: 280px;
}

.verto-tab-loading [role="tabpanel"]::before,
.verto-tab-loading .dxbl-tabs-content::before {
    content: "Loading...";
    position: absolute;
    inset: 0;
    z-index: 21;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.72);
    color: #64748b;
    font-size: 0.95rem;
    pointer-events: none;
}
