/* Shared styles for the agent, profile and topic detail pages (SectionCard, DetailPageHeader)
   and the compact settings widgets. Global rather than scoped: the classes also sit on Radzen roots. */

/* ---- Header ---- */

/* Sticky at the top of the scrolling area. Needs no overflow/transform on the ancestors. */
.detail-page-header {
    position: sticky;
    top: 0;
    z-index: 10;
    margin-bottom: 1rem;
    padding-top: 1rem;
    padding-bottom: 0.5rem;
    background-color: #F4F6FA;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .detail-page-header {
    background-color: #333333;
}

.detail-page-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 40vw;
}

.detail-page-active {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.detail-page-active-label {
    font-size: 0.8rem;
    color: var(--rz-text-secondary-color);
}

.detail-page-favorite.rz-button {
    padding: 0.25rem;
    min-width: 0;
}

.detail-page-favorite .favorite-star-icon {
    width: 20px;
    height: 20px;
}

.detail-page-actions-separator {
    width: 1px;
    height: 28px;
    background-color: #E5E7EB;
}

/* "..." menu: red text for the delete item, icon in the text color, rounded hover. */
.detail-page-more-menu.rz-menu {
    padding: 0.25rem;
    border-radius: 10px;
}

.detail-page-more-menu .rz-navigation-item,
.detail-page-more-menu .rz-navigation-item-wrapper,
.detail-page-more-menu .rz-navigation-item-link {
    border-radius: 8px;
    overflow: hidden;
}

.detail-page-more-menu .detail-page-menu-danger .rz-navigation-item-text {
    color: #E5484D !important;
}

.detail-page-more-menu .detail-page-menu-danger .rz-navigation-item-icon {
    color: var(--rz-text-color) !important;
}

/* Thin vertical separator (modifier of .vertical-separator). */
.vertical-separator.vertical-separator--thin {
    width: 0;
    height: 22px;
    margin: 0 0.25rem;
    border-width: 0 0 0 1px;
    border-color: #D9DCE3;
}

/* Borderless dropdown, same as the language dropdown in the top bar. */
.template-dropdown.rz-dropdown,
.template-dropdown.rz-dropdown.rz-state-focused,
.template-dropdown.rz-dropdown:focus-within {
    border: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.template-dropdown.rz-dropdown:hover:not(.rz-state-disabled) {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .vertical-separator.vertical-separator--thin {
    border-color: #4B4957;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .template-dropdown.rz-dropdown:hover:not(.rz-state-disabled) {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Content that stops short of the right edge of its section. */
.section-inset {
    max-width: 88%;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .detail-page-actions-separator {
    background-color: #4B4957;
}

/* ---- Collapsible sections ---- */

.section-card-collapsible.rz-card {
    padding: 0 !important;
    border: 1px solid #E5E7EB;
}

.section-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    user-select: none;
}

.section-card-subtitle {
    color: var(--rz-text-secondary-color);
}

.section-card-chevron {
    color: var(--rz-text-secondary-color);
}

.section-card-body {
    border-top: 1px solid #E5E7EB;
    padding: 1rem 1.25rem 1.25rem;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .section-card-collapsible.rz-card,
:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .section-card-body {
    border-color: #4B4957;
}

/* ---- Switch ----
   Single style for every switch in the app; only the chat dev-mode toggle (.custom-switch) keeps its own. */

.rz-switch:not(.custom-switch) {
    width: 2rem;
    min-width: 2rem;
    height: 1.125rem;
}

.rz-switch:not(.custom-switch) .rz-switch-circle {
    background: #D1D5DB;
    border-radius: 999px;
}

.rz-switch:not(.custom-switch).rz-switch-checked .rz-switch-circle {
    background: var(--rz-primary);
}

.rz-switch:not(.custom-switch) .rz-switch-circle:before,
.rz-switch:not(.custom-switch).rz-switch-checked .rz-switch-circle:before {
    width: 0.875rem;
    height: 0.875rem;
    margin-block-start: -0.4375rem;
    inset-inline-start: 2px;
    border-radius: 50%;
    background: #FFFFFF;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.rz-switch:not(.custom-switch).rz-switch-checked .rz-switch-circle:before {
    transform: translateX(0.875rem);
}

.rz-switch:not(.custom-switch) .rz-switch-circle:hover:not(.rz-disabled):before,
.rz-switch:not(.custom-switch).rz-switch-checked .rz-switch-circle:hover:not(.rz-disabled):before {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .rz-switch:not(.custom-switch) .rz-switch-circle {
    background: #4B4957;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .rz-switch:not(.custom-switch).rz-switch-checked .rz-switch-circle {
    background: var(--rz-primary);
}

/* ---- Slider ---- */

.detail-page {
    --rz-slider-horizontal-height: 6px;
    --rz-slider-border: none;
    --rz-slider-border-radius: 999px;
    --rz-slider-background-color: #EEF0F4;
    --rz-slider-range-background-color: var(--rz-primary);
    --rz-slider-range-border: none;
    --rz-slider-handle-width: 12px;
    --rz-slider-handle-height: 12px;
    --rz-slider-handle-border-radius: 50%;
    --rz-slider-handle-background-color: #FFFFFF;
    --rz-slider-handle-border: 2px solid var(--rz-primary);
    --rz-slider-handle-shadow: none;
    --rz-slider-handle-hover-background-color: #FFFFFF;
    --rz-slider-handle-hover-border: 2px solid var(--rz-primary);
    --rz-slider-handle-hover-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .detail-page {
    --rz-slider-background-color: #4B4957;
    --rz-slider-handle-background-color: #2B2A33;
    --rz-slider-handle-hover-background-color: #2B2A33;
}

/* ---- Section tabs ---- */

.detail-tabs {
    --rz-tabs-tab-font-size: 0.875rem;
    --rz-tabs-tab-font-weight: 500;
    --rz-tabs-tab-text-transform: none;
    --rz-tabs-tab-letter-spacing: 0;
    --rz-tabs-tab-padding-block: 0.5rem;
    --rz-tabs-tab-padding-inline: 0;
    --rz-tabs-tab-color: var(--rz-text-secondary-color);
    --rz-tabs-tab-hover-background-color: transparent;
    --rz-tabs-tab-hover-color: var(--rz-text-title-color);
    --rz-tabs-tab-selected-color: var(--rz-text-title-color);
    --rz-tabs-padding: 1rem 0 0;
}

.detail-tabs.rz-tabview > .rz-tabview-nav {
    gap: 1.5rem;
    border-bottom: 1px solid #E5E7EB;
}

.detail-tabs.rz-tabview > .rz-tabview-nav .rz-tabview-selected {
    font-weight: 600;
    border-bottom-color: transparent !important;
}

.detail-tabs.rz-tabview > .rz-tabview-nav li {
    position: relative;
}

/* Underline under the selected tab covers half of the label. */
.detail-tabs.rz-tabview > .rz-tabview-nav .rz-tabview-selected::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 50%;
    height: 2px;
    background-color: var(--rz-primary);
}

.detail-tabs.rz-tabview > .rz-tabview-panels {
    border-top: none;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .detail-tabs.rz-tabview > .rz-tabview-nav {
    border-bottom-color: #4B4957;
}

/* ---- Empty cell placeholder ---- */

.empty-cell {
    color: var(--rz-text-disabled-color, #9CA3AF);
}

/* ---- File table (FileDialog) ---- */

.file-search {
    position: relative;
    width: 220px;
}

.file-search.file-search--full {
    width: 100%;
}

.file-search .file-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: var(--rz-text-secondary-color);
    cursor: pointer;
    z-index: 1;
}

.file-search .file-search-input.rz-textbox,
.file-search .rz-textbox.file-search-input:not(.rz-state-disabled) {
    padding-left: 2.1rem;
    background-color: #F4F6F9 !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    border-radius: 8px;
    font-size: 0.85rem;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .file-search .file-search-input.rz-textbox,
:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .file-search .rz-textbox.file-search-input:not(.rz-state-disabled) {
    background-color: rgba(255, 255, 255, 0.06) !important;
}

/* Light grid: no frame, small gray headers, row dividers only. */
.file-grid.rz-data-grid {
    border: none;
    background-color: transparent;
}

.file-grid .rz-grid-table thead th {
    background-color: transparent;
    border-bottom: 1px solid #E5E7EB;
}

.file-grid .rz-grid-table thead th .rz-column-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--rz-text-secondary-color);
    text-transform: none;
}

.file-grid .rz-grid-table td {
    border-bottom: 1px solid #F0F1F4;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .file-grid .rz-grid-table thead th,
:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .file-grid .rz-grid-table td {
    border-bottom-color: #3A3944;
}

.file-grid .rz-badge {
    border-radius: 5px !important;
}

.file-row-icon.rzi {
    font-size: 1.2rem;
}

/* Folder names are links: same color as the names in the MCP Server list. */
.folder-name-link,
.rz-button .folder-name-link,
.rz-button:hover .folder-name-link {
    color: var(--rz-primary) !important;
    font-weight: 500;
}

.folder-badge {
    background-color: #ECEDF0 !important;
    color: #4B5563 !important;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .folder-badge {
    background-color: #4B4957 !important;
    color: #E5E7EB !important;
}

/* File status pill */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.1rem 0.5rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    background-color: #ECEDF0;
    color: #6B7280;
}

.status-pill--success {
    background-color: #DDF7F1;
    color: #0F9F85;
}

.status-pill--warning {
    background-color: #FEF3C7;
    color: #B45309;
}

.status-pill--error {
    background-color: #FEE2E2;
    color: #DC2626;
}

.status-pill--progress {
    background-color: #EEF0FD;
    color: #4F46E5;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .status-pill {
    background-color: #4B4957;
    color: #D1D5DB;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .status-pill--success {
    background-color: #1F4A42;
    color: #6EE7C8;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .status-pill--warning {
    background-color: #4D3B16;
    color: #FCD34D;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .status-pill--error {
    background-color: #4C2427;
    color: #FCA5A5;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .status-pill--progress {
    background-color: #1D2349;
    color: #C7CBFF;
}

/* ---- Agent tools (MCP, external agents, skills) ---- */

.tool-block {
    background-color: #F4F6FA;
    border-radius: 10px;
    padding: 0.75rem 1rem;
}

/* Radzen loads after this file and resets Body1 to weight 400: needs more specificity. */
.tool-block .tool-block-title.rz-text {
    font-weight: 600;
}

.tool-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 0.35rem 0.25rem 0.35rem 0.75rem;
}

/* Skill chip: domain color swatch, bold name, domain below (--domain-* from DomainBadgeStyle). */
.tool-chip--skill {
    padding-left: 0.5rem;
    min-width: 160px;
}

.tool-chip-swatch {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    flex-shrink: 0;
    background-color: var(--domain-bg);
}

.tool-chip-name {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
}

.tool-chip-domain {
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--domain-text, #6366F1);
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .tool-block {
    background-color: rgba(255, 255, 255, 0.06);
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .tool-chip {
    background-color: #2B2A33;
    border-color: #4B4957;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .tool-chip-swatch {
    background-color: var(--domain-bg-dark);
}

/* ---- Prompt: regenerate and tone chips ---- */

.system-prompt-wrapper {
    position: relative;
    width: 100%;
}

/* Room at the bottom of the prompt for the "Regenerate with AI" button. */
.system-prompt-wrapper textarea {
    padding-bottom: 3.25rem;
}

.system-prompt-wrapper .regenerate-prompt-button {
    position: absolute;
    right: 1rem;
    bottom: 1.25rem;
}

.ai-action-button.rz-button {
    text-transform: none;
    border-radius: 999px;
    border: 1px solid #C7D2FE;
    background: linear-gradient(180deg, #FFFFFF 0%, #EEF2FF 100%);
    color: #1F2937;
    box-shadow: 0 1px 3px rgba(99, 102, 241, 0.25);
}

.tone-chip.rz-button {
    text-transform: none;
    border-radius: 8px;
}

.tone-chip.tone-chip--selected.rz-button {
    background-color: #EEF0FD !important;
    border-color: #8B8FF0 !important;
    color: #4F46E5 !important;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .ai-action-button.rz-button {
    background: linear-gradient(180deg, #2B2A33 0%, #1D2349 100%);
    border-color: #5664E5;
    color: #E5E7EB;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .tone-chip.tone-chip--selected.rz-button {
    background-color: #1D2349 !important;
    border-color: #5664E5 !important;
    color: #C7CBFF !important;
}

/* ---- Settings column ---- */

.settings-card.rz-card {
    border: 1px solid #E5E7EB;
}

/* Parameters stop short of the right edge of the card. */
.settings-card-body {
    max-width: 360px;
}

.setting-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--rz-text-title-color);
}

.setting-value {
    color: var(--rz-primary);
    font-size: 0.85rem;
    font-weight: 600;
}

.setting-help {
    color: var(--rz-text-secondary-color);
}

/* Segmented control: gray container, selected option on white and bold. */
.setting-segmented.rz-selectbar {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 2px;
    padding: 3px;
    border-radius: 8px;
    background-color: #F1F2F6;
}

/* Single selector, no :not(:first-child): a more specific rule would repaint the selected option
   gray when it is not the first one. */
.setting-segmented.rz-selectbar .rz-button {
    text-transform: none;
    flex: 1 1 auto;
    white-space: nowrap;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.3rem 0.7rem;
    border: none;
    border-radius: 6px !important;
    background-color: transparent;
    color: var(--rz-text-secondary-color);
    box-shadow: none;
}

.setting-segmented.rz-selectbar .rz-button:hover {
    background-color: rgba(255, 255, 255, 0.6);
}

.setting-segmented.rz-selectbar .rz-button.rz-state-active {
    background-color: #FFFFFF;
    color: var(--rz-text-title-color);
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .setting-segmented.rz-selectbar {
    background-color: rgba(255, 255, 255, 0.06);
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .setting-segmented.rz-selectbar .rz-button.rz-state-active {
    background-color: #4B4957;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .settings-card.rz-card {
    border-color: #4B4957;
}

/* ---- Dark tooltip ---- */

.rz-tooltip.detail-tooltip .rz-tooltip-content {
    background-color: #111827;
    color: #F9FAFB;
    padding: 0.5rem 0.85rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

/* The arrow inherits background and border from the content. */
:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .rz-tooltip.detail-tooltip .rz-tooltip-content {
    background-color: #0B0F19;
    border-color: rgba(255, 255, 255, 0.14);
}

/* ---- Non-collapsible section card: plain titled card, no divider ---- */

.section-card-static .section-card-header {
    cursor: default;
}

.section-card-static .section-card-body {
    border-top: none;
    padding-top: 0;
}

/* ---- Index status panel (profile page) ---- */

.index-status-card.rz-card {
    border: 1px solid #E5E7EB;
}

.index-stats-box {
    background-color: #F4F6FA;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.index-stats-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.index-stats-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--rz-text-secondary-color);
}

.index-stats-updated {
    margin-top: 0.4rem;
    font-size: 0.7rem;
    color: var(--rz-text-disabled-color, #9CA3AF);
}

.profile-id-row {
    font-size: 0.8rem;
    color: var(--rz-text-secondary-color);
}

.profile-id-label {
    font-size: 0.7rem;
}

.profile-id-value {
    flex: 1 1 auto;
    min-width: 0;
}

.index-status-divider {
    width: 100%;
    margin: 0;
    border: none;
    border-top: 1px solid #E5E7EB;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .index-status-card.rz-card,
:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .index-status-divider {
    border-color: #4B4957;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .index-stats-box {
    background-color: rgba(255, 255, 255, 0.06);
}

/* ---- Manage icon in the file table (SVG used as a mask so it follows the text color) ---- */

.manage-file-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: currentColor;
    -webkit-mask: url("../../images/icons/manage-file-icon.svg") center / contain no-repeat;
    mask: url("../../images/icons/manage-file-icon.svg") center / contain no-repeat;
}

/* ---- Dialogs: rounded, title edge to edge with a separator ---- */

/* !important: Radzen sets its own radius on the dialog box. */
.detail-dialog,
.confirm-reindex-dialog {
    border-radius: 16px !important;
    overflow: hidden;
}

.detail-dialog .rz-dialog-titlebar {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #E5E7EB;
}

/* Beats ".custom-dialog .rz-dialog-title" of the pages (indented title). */
.detail-dialog.custom-dialog .rz-dialog-title,
.detail-dialog .rz-dialog-title {
    margin-left: 0;
}

.detail-dialog .rz-dialog-content {
    padding: 1rem 1.5rem 1.5rem;
}

.confirm-reindex-dialog .rz-dialog-titlebar {
    padding: 1.25rem 1.5rem 0.25rem;
}

.confirm-reindex-dialog .rz-dialog-content {
    padding: 0.5rem 1.5rem 1.5rem;
}

/* Dialog with a subtitle: the separator goes under the subtitle, before the search. */
.detail-dialog--subtitle .rz-dialog-titlebar {
    border-bottom: none;
    padding-bottom: 0.25rem;
}

.detail-dialog--subtitle .all-entities-subtitle {
    margin: -0.5rem -1.5rem 0;
    padding: 0 1.5rem 0.9rem;
    border-bottom: 1px solid #E5E7EB;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .detail-dialog--subtitle .all-entities-subtitle {
    border-bottom-color: #4B4957;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .detail-dialog .rz-dialog-titlebar {
    border-bottom-color: #4B4957;
}

/* ---- Index status links: "View logs" purple, "Refresh" blue ---- */

.index-link.rz-button,
.index-link.rz-button .rz-button-text,
.index-link.rz-button .rzi {
    text-transform: none;
}

.index-link--logs.rz-button,
.index-link--logs.rz-button .rz-button-text,
.index-link--logs.rz-button .rzi {
    color: #8042FE !important;
}

.index-link--refresh.rz-button,
.index-link--refresh.rz-button .rz-button-text,
.index-link--refresh.rz-button .rzi {
    color: #7196E0 !important;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .index-link--logs.rz-button,
:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .index-link--logs.rz-button .rz-button-text,
:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .index-link--logs.rz-button .rzi {
    color: #B79BFF !important;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .index-link--refresh.rz-button,
:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .index-link--refresh.rz-button .rz-button-text,
:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .index-link--refresh.rz-button .rzi {
    color: #9DB8F0 !important;
}

/* ---- Layout guide dialog ---- */

/* Title and body share the same side padding. */
.layout-guide-dialog .rz-dialog-titlebar {
    padding-inline: 1.5rem;
}

.layout-guide-dialog .rz-dialog-content {
    padding-inline: 0;
}

.layout-guide-body {
    margin: 0 1.5rem 1.5rem;
}

/* Edge to edge: cancels the side margin of .layout-guide-body. */
.dialog-divider--full {
    width: calc(100% + 3rem);
    margin-inline: -1.5rem;
}

.dialog-divider {
    width: 100%;
    margin: 0;
    border: none;
    border-top: 1px solid #E5E7EB;
}

.guide-card {
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    background-color: #F9FAFE;
    padding: 0.75rem 1rem;
}

.guide-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.guide-card-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.guide-family {
    font-weight: 600;
    font-size: 0.85rem;
    min-width: 0;
}

.guide-card-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.guide-card-summary {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--rz-text-secondary-color);
}

.guide-card-question {
    margin: 0.6rem 0 0;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    background-color: #FEF3C7;
    color: #92400E;
    font-size: 0.85rem;
    line-height: 1.45;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .dialog-divider,
:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .guide-card {
    border-color: #4B4957;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .guide-card {
    background-color: rgba(255, 255, 255, 0.04);
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .guide-card-question {
    background-color: #4D3B16;
    color: #FCD34D;
}

/* ---- Topic page: files created by agents ---- */

.skill-file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #E5E7EB;
}

.skill-file-row:last-child {
    border-bottom: none;
}

/* Fixed width so Assign / Share link start at the same x in every row. */
.skill-file-info {
    display: flex;
    flex-direction: column;
    flex: 0 1 22rem;
    width: 22rem;
    min-width: 0;
}

.skill-file-actions--end {
    margin-left: auto;
}

.skill-file-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.skill-file-meta {
    font-size: 0.75rem;
    color: var(--rz-text-secondary-color);
}

.skill-file-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.skill-file-action.rz-button {
    text-transform: none;
}

.skill-files-empty {
    padding: 1rem 0;
    color: var(--rz-text-secondary-color);
}

/* Popovers of a file row ("Assign to agent", "Share link") */
.skill-popover {
    width: 300px;
    background-color: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.skill-popover-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
}

.skill-popover-title {
    font-weight: 600;
}

.skill-popover-submit {
    align-self: flex-end;
}

.skill-popover-label {
    font-size: 0.75rem;
    color: var(--rz-text-secondary-color);
}

.skill-agent-list {
    max-height: 190px;
    overflow-y: auto;
    padding: 0.25rem 0.1rem;
}

.skill-popover-search.rz-textbox {
    background-color: #F4F6F9;
    border-color: transparent;
    border-radius: 8px;
    font-size: 0.85rem;
}

/* Read-only link and "Copy" inside one rounded gray box. */
.skill-link-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    background-color: color-mix(in srgb, var(--rz-text-color) 6%, transparent);
}

.skill-link-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.75rem;
    color: var(--rz-text-secondary-color);
}

.skill-link-copy {
    flex-shrink: 0;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--rz-primary);
}

.skill-link-copy:disabled {
    opacity: 0.4;
    cursor: default;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .skill-file-row {
    border-bottom-color: #4B4957;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .skill-popover {
    background-color: #2B2A33;
    border-color: #4B4957;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .skill-popover-search.rz-textbox {
    background-color: rgba(255, 255, 255, 0.06);
}

/* ---- Topic page: profile and agent lists ---- */

.entity-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.entity-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.35rem;
    border-radius: 8px;
    cursor: pointer;
}

.entity-row:hover {
    background-color: color-mix(in srgb, var(--rz-text-color) 7%, transparent);
}

.entity-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.875rem;
    font-weight: 600;
}

.entity-chevron {
    color: var(--rz-text-secondary-color);
    font-size: 1.1rem;
}

/* Small bar before the name: teal when active, gray when not. */
.entity-pill {
    flex-shrink: 0;
    width: 24px;
    height: 10px;
    border-radius: 999px;
}

.entity-pill--active {
    background-color: #8EDBCD;
}

.entity-pill--inactive {
    background-color: #C3C8D1;
}

/* Agent kinds: gray Base, green Smart, orange Video. */
.entity-pill--base {
    background-color: #C3C8D1;
}

.entity-pill--smart {
    background-color: #8EDBCD;
}

.entity-pill--video {
    background-color: #FFC47D;
}

.entity-pill--faded {
    opacity: 0.65;
}

.entity-row .vertical-separator--thin {
    flex-shrink: 0;
    border-style: solid;
    margin: 0 0.1rem;
}

.check-updates-note {
    font-size: 0.7rem;
    color: var(--rz-text-secondary-color);
}

.all-entities-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.all-entities-subtitle {
    font-size: 0.8rem;
    color: var(--rz-text-secondary-color);
}

.all-entities-search.rz-textbox {
    background-color: #F4F6F9;
    border-color: transparent;
    border-radius: 8px;
}

.all-entities-list {
    max-height: min(60vh, 520px);
    overflow-y: auto;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .entity-pill--active {
    background-color: #2F8576;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .entity-pill--inactive,
:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .entity-pill--base {
    background-color: #6E6C85;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .entity-pill--smart {
    background-color: #2F8576;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .entity-pill--video {
    background-color: #B3711F;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .all-entities-search.rz-textbox {
    background-color: rgba(255, 255, 255, 0.06);
}

/* ---- Dialogs and popovers are rendered outside the themed layout, so they have no
   ".rz-material-dark" ancestor: the dark rules above also match through
   "body:has(.rz-layout.rz-material-dark)". These derive from the theme text color. ---- */

.detail-dialog .file-search .file-search-input.rz-textbox,
.detail-dialog .file-search .rz-textbox.file-search-input:not(.rz-state-disabled),
.skill-popover .file-search .file-search-input.rz-textbox,
.skill-popover .file-search .rz-textbox.file-search-input:not(.rz-state-disabled) {
    background-color: color-mix(in srgb, var(--rz-text-color) 7%, transparent) !important;
    color: var(--rz-text-color);
}

.detail-dialog .rz-dialog-titlebar,
.detail-dialog--subtitle .all-entities-subtitle {
    border-bottom-color: color-mix(in srgb, var(--rz-text-color) 14%, transparent);
}

.detail-dialog--subtitle .rz-dialog-titlebar {
    border-bottom: none;
}

/* Dark grids (also inside dialogs): transparent rows, faint zebra, no white borders. */
:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .file-grid .rz-grid-table tbody tr > td {
    background-color: transparent;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .file-grid .rz-grid-table tbody tr.rz-datatable-odd > td {
    background-color: rgba(255, 255, 255, 0.03);
}

/* ---- Developer keys: connect card and dialogs ---- */

.dk-connect.rz-card {
    padding: 1.25rem;
    border: 1px solid #E5E7EB;
    background-color: #FFFFFF;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.dk-connect-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dk-connect-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background-color: #EDEEF1;
    color: var(--rz-text-secondary-color);
}

.dk-connect-title {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.dk-muted {
    color: var(--rz-text-secondary-color);
    font-size: 0.8125rem;
}

.dk-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.dk-micro-label,
.dk-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--rz-text-secondary-color);
}

.dk-label {
    color: var(--rz-text-color);
    font-size: 0.8125rem;
}

.dk-code-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 40px;
    padding: 0.35rem 0.5rem 0.35rem 0.75rem;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    background-color: #F4F6FA;
}

.dk-code {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.8125rem;
    overflow-wrap: anywhere;
}

.dk-note {
    font-size: 0.75rem;
}

/* Copy buttons: light outline, smaller bold text. */
.dk-copy-button.rz-button.rz-variant-outlined {
    background-color: #FFFFFF !important;
    box-shadow: inset 0 0 0 1px #E5E7EB !important;
    font-size: 0.75rem;
    font-weight: 700;
}

.dk-copy-button--lg.rz-button.rz-variant-outlined {
    font-size: 0.8125rem;
}

.dk-copy-button .rzi,
.dk-copy-button .rz-button-icon-left {
    font-size: 1rem;
}

.dk-copy-button--lg .rzi,
.dk-copy-button--lg .rz-button-icon-left {
    font-size: 0.875rem;
}

/* Status as plain text, same size as the neighbouring cells. */
.dk-status {
    font-size: 0.875rem;
    color: var(--rz-text-secondary-color);
}

.dk-row-revoked > td {
    opacity: 0.6;
}

.dk-status--active {
    color: #0F9F85;
    font-weight: 600;
}

/* Dialogs: own header/body/footer, so the Radzen title bar and padding are off. */
.dk-dialog {
    border-radius: 16px !important;
    overflow: hidden;
}

/* ---- Sync updates dialog (SharePoint / Google Classroom) ---- */

.sync-updates-grid.rz-data-grid {
    border: 1px solid #E5E7EB;
}


.sync-file-name {
    overflow-wrap: anywhere;
}

.sync-dates {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0.75rem;
    font-size: 0.75rem;
    line-height: 1.4;
}

.sync-dates-label,
.sync-none,
.sync-more {
    color: var(--rz-text-secondary-color);
}

.sync-dates-value--new {
    font-weight: 600;
}

.sync-more {
    font-size: 0.72rem;
    margin-top: 0.15rem;
}

.sync-updates-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1rem -1.5rem 0;
    padding: 1rem 1.5rem 0;
    border-top: 1px solid #E5E7EB;
}

.sync-updates-note {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--rz-text-secondary-color);
}

.sync-updates-note .rzi {
    font-size: 1.1rem;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .sync-updates-grid.rz-data-grid,
:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .sync-updates-footer {
    border-color: #4B4957;
}

/* Dialog title as in the mockup, close to its subtitle; no separator under the subtitle. */
.sync-updates-dialog .rz-dialog-titlebar {
    padding: 1.5rem 1.5rem 0;
    border-bottom: none;
}

.sync-updates-dialog .rz-dialog-title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.25;
}

/* ---- Delete topic confirmation ---- */

.confirm-delete-dialog:has(.delete-topic-dialog) {
    border-radius: 16px !important;
    overflow: hidden;
}

.dk-dialog .rz-dialog-content {
    padding: 0;
}

/* Thin light outline on the outlined buttons (Cancel, Done, Copy again); lighter Dark for the primary action. */
.dk-dialog .rz-button.rz-variant-outlined.rz-base {
    box-shadow: inset 0 0 0 1px #E5E7EB !important;
}

.dk-dialog .rz-button.rz-dark.rz-variant-flat:not(.rz-state-disabled) {
    background-color: #4B5057;
}

.dk-dialog-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.25rem 1.25rem 0.75rem;
}

.dk-dialog-titles {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dk-dialog-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.dk-dialog-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.25rem 1.25rem 1.25rem;
}

.dk-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.9rem 1.25rem;
    border-top: 1px solid #E5E7EB;
}

.dk-callout {
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-size: 0.8125rem;
}

/* Same warning look as the hub branding contrast notice. */
.dk-callout--warning {
    background: #FFF9EC;
    color: #D97706;
}

.dk-warning-icon {
    flex: none;
    width: 1.15em;
    height: 1.15em;
    background-color: currentColor;
    -webkit-mask: url("/images/icons/warning-icon.svg") center / contain no-repeat;
    mask: url("/images/icons/warning-icon.svg") center / contain no-repeat;
}

.dk-copied {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #0F9F85;
}

.dk-copied .rz-icon {
    font-size: 0.8rem;
}

.dk-hint {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    font-size: 0.75rem;
}

.dk-hint .rz-icon {
    font-size: 0.8rem;
}

/* ---- Revoke key confirmation (same layout as the delete topic dialog, deeper red) ---- */

.dk-revoke-dialog {
    position: relative;
    width: 540px;
    max-width: 90vw;
}

.dk-revoke-close.rz-button {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 28px;
    height: 28px;
    min-width: 0;
    padding: 0;
    border-radius: 999px;
}

.confirm-delete-dialog:has(.delete-topic-dialog) .rz-dialog-content {
    padding: 0;
}

.delete-topic-dialog {
    position: relative;
    width: 560px;
    max-width: 90vw;
}

.delete-topic-close.rz-button {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 28px;
    height: 28px;
    min-width: 0;
    padding: 0;
    border-radius: 999px;
}

.dk-revoke-body {
    padding: 3rem 1.5rem 1.5rem;
}

.dk-revoke-icon-circle {
    flex: none;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: rgba(185, 28, 28, 0.12);
}

/* Large top padding keeps the header well below the close button. */
.delete-topic-body {
    padding: 3rem 1.5rem 1.5rem;
}

.delete-topic-icon-circle {
    flex: none;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.12);
}

/* Warning icon (SVG) painted with the danger color. */
.dk-revoke-icon {
    width: 24px;
    height: 24px;
    background-color: #B91C1C;
    -webkit-mask: url("/images/icons/warning-icon.svg") center / contain no-repeat;
    mask: url("/images/icons/warning-icon.svg") center / contain no-repeat;
}

.delete-topic-icon {
    width: 24px;
    height: 24px;
    background-color: #ef4444;
    -webkit-mask: url("/images/icons/warning-icon.svg") center / contain no-repeat;
    mask: url("/images/icons/warning-icon.svg") center / contain no-repeat;
}

.dk-revoke-dialog .dk-revoke-warning-block.rz-card {
    padding: 0.9rem 1rem;
    border-radius: 10px;
    background: rgba(185, 28, 28, 0.08);
}

.dk-revoke-warning-block .dk-revoke-warning-caption {
    color: #000;
}

.dk-revoke-dialog .dk-revoke-warning-block .dk-revoke-warning-line {
    font-size: 0.9rem;
    font-weight: 400;
    color: #3F3F46;
}

.dk-revoke-dialog .dk-revoke-title {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.25;
}

.dk-revoke-dialog .dk-revoke-subtitle {
    font-size: 0.75rem;
}

.dk-revoke-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #E5E7EB;
}

.delete-topic-dialog .delete-topic-warning-block.rz-card {
    padding: 0.9rem 1rem;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.08);
}

.delete-topic-warning-block .delete-topic-warning-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
    font-size: 0.9rem;
    color: #991b1b;
}

.delete-topic-warning-list > li {
    margin-bottom: 4px;
    padding-left: 1.1rem;
    text-indent: -1.1rem;
}

.delete-topic-warning-list > li::before {
    content: "–";
    display: inline-block;
    width: 1.1rem;
    text-indent: 0;
}

.delete-topic-warning-sublist {
    margin: 4px 0 0;
    padding-left: 1.1rem;
    max-height: 8rem;
    overflow-y: auto;
    list-style: disc;
    text-indent: 0;
}

.delete-topic-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #E5E7EB;
}

.dk-revoke-dialog .dk-revoke-confirm.rz-button.rz-danger.rz-variant-flat {
    background-color: #DB2626;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .dk-connect.rz-card {
    background-color: #1E1D26;
    border-color: #4B4957;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .dk-connect-icon,
:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .dk-code-box {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: #4B4957;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .dk-dialog-footer,
:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .dk-revoke-footer {
    border-top-color: #4B4957;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .dk-dialog .rz-button.rz-variant-outlined.rz-base,
:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .dk-copy-button.rz-button.rz-variant-outlined {
    box-shadow: inset 0 0 0 1px #4B4957 !important;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .dk-copy-button.rz-button.rz-variant-outlined {
    background-color: transparent !important;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .dk-callout--warning {
    background: rgba(245, 158, 11, 0.15);
    color: #FBBF24;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .dk-dialog .dk-revoke-warning-block.rz-card {
    background: rgba(220, 38, 38, 0.16);
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .dk-revoke-warning-block .dk-revoke-warning-caption,
:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .dk-revoke-warning-block .dk-revoke-warning-line {
    color: var(--rz-text-color);
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .dk-revoke-icon {
    background-color: #F87171;
}

/* Radzen text keeps the sizes of the design: prefixed so it wins over the theme. */
.dk-connect .dk-muted,
.dk-dialog .dk-muted {
    font-size: 0.8125rem;
}

.dk-connect .dk-note,
.dk-dialog .dk-hint .dk-muted {
    font-size: 0.75rem;
}

.dk-connect .dk-micro-label,
.dk-dialog .dk-label {
    font-size: 0.75rem;
    font-weight: 600;
}

.dk-dialog .dk-label {
    font-size: 0.8125rem;
}

.dk-dialog .dk-dialog-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.dk-dialog .dk-callout .dk-callout-text {
    font-size: 0.8125rem;
    color: inherit;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .delete-topic-footer {
    border-top-color: #4B4957;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .delete-topic-dialog .delete-topic-warning-block.rz-card {
    background: rgba(239, 68, 68, 0.16);
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .delete-topic-warning-block .delete-topic-warning-list {
    color: #fca5a5;
}

/* Same weight and size as the mockup title. */
.delete-topic-dialog .delete-topic-title {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.25;
}

.sync-updates-dialog .all-entities-subtitle {
    margin: 0 0 1rem;
    padding: 0;
    border-bottom: none;
    color: var(--rz-text-secondary-color);
}

.sync-file-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Icon close to the file name. */
.sync-file-cell .sync-file-icon {
    margin-right: -0.4rem;
    color: var(--rz-text-secondary-color);
}

.sync-updates-grid .rz-grid-table td {
    vertical-align: middle;
}

/* Neutral rows: no selection highlight, text keeps its color. */
.sync-updates-grid .rz-grid-table tr.rz-state-highlight > td,
.sync-updates-grid .rz-grid-table tr.rz-state-highlight:hover > td {
    background-color: transparent;
    color: inherit;
}

/* Small checkboxes with a light radius. */
.sync-updates-grid .rz-chkbox-box {
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 4px;
}

.sync-updates-grid .rz-chkbox-box.rz-state-active {
    background-color: var(--rz-primary-light, #6966DB);
    border-color: var(--rz-primary-light, #6966DB);
}

.sync-updates-grid .rz-chkbox-box .rzi {
    font-size: 0.9rem;
}

.sync-updates-grid .sync-dates,
.sync-updates-grid .sync-dates-value,
.sync-updates-grid .sync-dates-value--new {
    color: var(--rz-text-color);
}

.sync-updates-grid .sync-dates-label {
    color: #9CA3AF;
}

/* Pills in the style of the Preview badge. */
.sync-updates-grid .status-pill {
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
}

.sync-updates-grid .status-pill--warning {
    background-color: #FEF3C7;
    color: #B45309;
}

.sync-updates-grid .status-pill--error {
    background-color: #FEE2E2;
    color: #B91C1C;
}

/* Footer buttons: light outline on Cancel, lighter Dark on the primary action. */
.sync-updates-footer .rz-button.rz-variant-outlined.rz-base {
    box-shadow: inset 0 0 0 1px #E5E7EB !important;
}

.sync-updates-footer .rz-button.rz-dark.rz-variant-flat:not(.rz-state-disabled) {
    background-color: #4B5057;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .sync-updates-footer .rz-button.rz-variant-outlined.rz-base {
    box-shadow: inset 0 0 0 1px #4B4957 !important;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .sync-updates-grid .status-pill--warning {
    background-color: rgba(240, 177, 94, 0.18);
    color: #F0B15E;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .sync-updates-grid .sync-dates-label {
    color: #9CA3AF;
}

/* Sync dialog, second pass: title tight to subtitle, tighter columns, centered check mark. */
.sync-updates-dialog .rz-dialog-titlebar {
    padding-bottom: 0;
}

.sync-updates-dialog .rz-dialog-title {
    margin-bottom: 0;
}

.sync-updates-dialog .rz-dialog-content {
    padding-top: 0;
}

.sync-updates-dialog .all-entities-subtitle {
    margin-top: 0;
}

.sync-updates-grid .rz-grid-table td,
.sync-updates-grid .rz-grid-table th {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.sync-updates-grid .sync-file-name {
    font-size: 0.85rem;
}

.sync-updates-grid .rz-chkbox-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sync-updates-grid .rz-chkbox-box .rzi {
    line-height: 1;
    margin: 0;
    font-size: 0.85rem;
}

.sync-updates-grid .rz-grid-table tr.rz-state-highlight > td,
.sync-updates-grid .rz-grid-table tr.rz-state-highlight:hover > td,
.sync-updates-grid .rz-grid-table tr.rz-state-highlight > td .rz-cell-data {
    background-color: transparent !important;
    color: var(--rz-text-color) !important;
}

/* Sync dialog, third pass: everything left-aligned with its column, long names wrap. */
.sync-updates-grid .rz-grid-table th,
.sync-updates-grid .rz-grid-table td,
.sync-updates-grid .rz-grid-table th .rz-column-title,
.sync-updates-grid .rz-grid-table th .rz-column-title-content,
.sync-updates-grid .rz-grid-table td .rz-cell-data {
    text-align: left !important;
    justify-content: flex-start !important;
}

.sync-updates-grid .rz-grid-table th .rz-column-title,
.sync-updates-grid .rz-grid-table th .rz-column-title-content {
    padding: 0;
    margin: 0;
    width: 100%;
}

.sync-updates-grid .rz-grid-table td .rz-cell-data {
    display: block;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.sync-updates-grid .sync-file-cell {
    justify-content: flex-start;
    min-width: 0;
}

.sync-updates-grid .sync-file-name {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}

.sync-updates-grid .sync-file-cell > .rz-chkbox,
.sync-updates-grid .sync-file-cell > .sync-file-icon {
    flex: none;
}

.sync-updates-grid .status-pill {
    display: inline-flex;
}

/* Check mark centered in the box. */
.sync-updates-grid .rz-chkbox-box {
    position: relative;
}

.sync-updates-grid .rz-chkbox-box .rz-chkbox-icon,
.sync-updates-grid .rz-chkbox-box .rzi {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    line-height: 1;
    font-size: 0.85rem;
}

/* Thin light outline on the outlined (Cancel) buttons of dialogs. */
.rz-dialog .rz-button.rz-variant-outlined.rz-base {
    box-shadow: inset 0 0 0 1px #E5E7EB !important;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .rz-dialog .rz-button.rz-variant-outlined.rz-base {
    box-shadow: inset 0 0 0 1px #4B4957 !important;
}

/* Reset-to-standard confirmation: the Dark flat button a little lighter. */
.hub-reset-dialog .rz-button.rz-dark.rz-variant-flat:not(.rz-state-disabled) {
    background-color: #4B5057;
}

/* ---- Orchestrators redesign ---- */

/* "Create with AI": same soft blue background as the user messages in the chat. */
.rz-button.ai-glow-button.rz-variant-outlined {
    background: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)), url('/images/backgrounds/user-message-bg.png') center / cover no-repeat !important;
    border-radius: 999px !important;
    border: none !important;
    box-shadow: 0 1px 8px rgba(67, 86, 255, 0.2) !important;
    color: rgba(0, 0, 0, 0.87) !important;
    transition: box-shadow 0.2s ease-in-out, filter 0.2s ease-in-out;
}

.rz-button.ai-glow-button.rz-variant-outlined:hover:not(:disabled) {
    box-shadow: 0 2px 14px rgba(67, 86, 255, 0.35) !important;
    filter: brightness(1.03);
}

/* The image is light in both themes, so the label stays dark (as in the chat bubble). */
:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .rz-button.ai-glow-button.rz-variant-outlined {
    color: rgba(0, 0, 0, 0.87) !important;
}

/* Orchestrators table: neutral name link, status switch and the pager of the new UI. */
.orchestrators-grid .orchestrator-name-link,
.orchestrators-grid .orchestrator-name-link:hover {
    color: var(--rz-text-color) !important;
    font-weight: 600;
    text-decoration: none;
}

.orchestrators-grid .orchestrator-status-cell {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* Pager of every table (as in the orchestrators mockup): summary on the left; prev, numbers and next on the right, small rounded squares. */
:is(.rz-data-grid, body) .rz-pager {
    justify-content: flex-end;
}

:is(.rz-data-grid, body) .rz-pager .rz-pager-summary {
    order: -1;
    margin-left: 0;
    margin-right: auto;
    padding: 0;
}

:is(.rz-data-grid, body) .rz-pager .rz-pager-prev {
    margin-inline-end: 0;
}

:is(.rz-data-grid, body) .rz-pager .rz-pager-next {
    margin-inline-start: 0;
}

:is(.rz-data-grid, body) .rz-pager .rz-pager-element .rz-button-box {
    height: 100%;
    align-items: center;
}

:is(.rz-data-grid, body) .rz-pager {
    background: transparent;
    padding: 0.75rem 1rem;
}

:is(.rz-data-grid, body) .rz-pager .rz-pager-first,
:is(.rz-data-grid, body) .rz-pager .rz-pager-last {
    display: none;
}

:is(.rz-data-grid, body) .rz-pager .rz-pager-element,
:is(.rz-data-grid, body) .rz-pager .rz-pager-page {
    min-width: 2rem;
    min-height: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    background-image: none;
    box-shadow: none !important;
    color: var(--rz-text-color);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: none;
}

:is(.rz-data-grid, body) .rz-pager .rz-pager-element:not(.rz-state-disabled):hover {
    background: #F3F4F6;
}

:is(.rz-data-grid, body) .rz-pager .rz-pager-page.rz-state-active,
:is(.rz-data-grid, body) .rz-pager .rz-pager-page.rz-state-active:hover {
    background: var(--rz-primary-lighter, #EEF0FF);
    border-color: var(--rz-primary-lighter, #EEF0FF);
    color: var(--rz-primary-light, #6966DB);
    font-weight: 600;
}

:is(.rz-data-grid, body) .rz-pager .rzi {
    font-size: 1.125rem;
    height: 1.125rem;
    width: 1.125rem;
    line-height: 1.125rem;
    vertical-align: middle;
}

:is(.rz-data-grid, body) .rz-pager .rz-pager-summary {
    color: var(--rz-text-secondary-color);
    font-size: 0.8125rem;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) :is(.rz-data-grid, body) .rz-pager .rz-pager-element:not(.rz-state-disabled):hover {
    background: #3A3942;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) :is(.rz-data-grid, body) .rz-pager .rz-pager-page.rz-state-active {
    background: rgba(105, 102, 219, 0.28);
    border-color: transparent;
    color: #C9C8FF;
}

.orchestrators-grid .orchestrator-status-cell span {
    font-weight: 700;
}

/* Detail header actions: lighter Dark on the primary action, light outline on Cancel (same as the sync dialog). */
.orchestrator-header-actions .rz-button.rz-dark.rz-variant-flat:not(.rz-state-disabled) {
    background-color: #4B5057;
}

.orchestrator-header-actions .rz-button.rz-variant-outlined.rz-base {
    box-shadow: inset 0 0 0 1px #E5E7EB !important;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .orchestrator-header-actions .rz-button.rz-variant-outlined.rz-base {
    box-shadow: inset 0 0 0 1px #4B4957 !important;
}

/* Orchestrator detail: header just under the navbar. */
.orchestrator-detail-page {
    padding-top: 0.25rem;
}

.rz-button.ai-glow-button .rzi {
    font-variation-settings: 'FILL' 1;
}

/* ---- List tables of the main pages: one width rule for all of them ----
   75vw on wide screens, full width up to 1280px, horizontal scroll up to 750px.
   Scoped to the page body so tables inside dialogs keep their own sizing. */
.main-body .custom-table {
    width: 75vw;
    max-width: 100%;
}

@media (max-width: 1280px) {
    .main-body .custom-table {
        width: 100%;
    }
}

@media (max-width: 750px) {
    .main-body .custom-table {
        overflow-x: auto;
    }
}

/* ---- QR/URL endpoint cards: grey header bar, bordered sub-sections ---- */

.custom-endpoint-card .rz-card.details {
    margin: 0 0.75rem;
    padding: 0 !important;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    overflow: hidden;
    background-color: #FFFFFF !important;
}

/* The bar fills the top of the bordered box: the box clips it, so the corners are the box's. */
.custom-endpoint-card .endpoint-details-title {
    margin-bottom: 1rem !important;
    padding: 0.2rem 1rem;
    border-radius: 0;
    background-color: #F0F1F6;
}

.custom-endpoint-card .endpoint-details-title .rz-button {
    height: 2rem;
}

.custom-endpoint-card .form-row {
    margin-top: 0.6rem;
}

/* Label column: centred on the first control (2.5rem tall) while the row is top-aligned. */
.custom-endpoint-card .form-row > .rz-col:first-child,
.custom-endpoint-card .form-row > [class*="rz-col-"]:first-child {
    padding-top: 0.5rem;
}

.custom-endpoint-card .details:not(.rz-card) {
    margin-left: 1.25rem;
    margin-right: 1.25rem;
}

.custom-endpoint-card .rz-card.details > .details:last-child {
    margin-bottom: 0.75rem;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .custom-endpoint-card .rz-card.details {
    border-color: #4B4957;
    background-color: transparent !important;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .custom-endpoint-card .endpoint-details-title {
    background-color: #3A3944;
}

/* Grey help text under a field (Radzen's secondary colour is pink in this theme). */
.endpoint-field-hint.rz-text-caption {
    display: block;
    margin: 0.5rem 0 0;
    color: var(--rz-text-secondary-color);
}

/* Inside a stack the gap already spaces it. */
.rz-stack > .endpoint-field-hint.rz-text-caption {
    margin-top: 0;
}

.endpoint-scope-badge {
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    background-color: #ECEEF5;
    color: var(--rz-text-secondary-color);
}

/* Square outlined icon button, black icon. */
.rz-button.endpoint-icon-square {
    width: 2.5rem;
    height: 2.5rem;
    min-width: 0;
    padding: 0;
    border-radius: 10px;
    border: 0;
    box-shadow: none;
    background-color: transparent;
    color: #111827;
}

.rz-button.endpoint-icon-square .rzi {
    color: inherit;
}

.rz-button.endpoint-icon-square.endpoint-icon-square--sm {
    width: 2rem;
    height: 2rem;
}

/* Header action icons sit in the 2rem bar: same square, a bit smaller. */
.custom-endpoint-card .rz-button.endpoint-icon-square.endpoint-header-icon {
    width: 2rem;
    height: 2rem;
    background-color: transparent;
}

/* Assistant logo: transparent PNGs sit on a white tile with a thin border. */
.endpoint-logo-preview {
    width: 4rem;
    height: 4rem;
    padding: 0.4rem;
    border: 1px solid #E5E7EB;
    border-radius: 15px;
    object-fit: contain;
    background-color: #FFFFFF;
}

.rz-button.endpoint-icon-square.endpoint-logo-delete {
    width: 1.75rem;
    height: 1.75rem;
    color: var(--rz-text-secondary-color);
}

.rz-button.endpoint-icon-square.endpoint-logo-delete .rzi {
    font-size: 1.1rem;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .endpoint-logo-preview {
    border-color: #4B4957;
}

.endpoint-domain-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem 0.5rem 1rem;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
}

.endpoint-domain-row__main {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    flex: 1;
}

.endpoint-domain-row__name {
    font-family: ui-monospace, monospace;
    font-size: 0.8125rem;
    overflow-wrap: anywhere;
}

.endpoint-domain-row__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .endpoint-domain-row {
    border-color: #4B4957;
}

/* Same height as the dropdown it sits next to (the row stretches it). */
.rz-button.endpoint-play-button {
    height: auto;
    min-height: 2.5rem;
}

.endpoint-embed-empty {
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    font-size: 0.8125rem;
    color: var(--rz-text-secondary-color);
    background-color: #F6F7FB;
}

.endpoint-embed-note.rz-text-caption {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.endpoint-embed-note .rzi {
    font-size: 1rem;
}

/* Warning banner: amber, as the warning alerts of the other pages. */
.endpoint-warning-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    font-size: 0.8125rem;
    background-color: #FFF9EC;
    color: #B45309;
}

.endpoint-warning-icon {
    flex: none;
    width: 1.15rem;
    height: 1.15rem;
    background-color: currentColor;
    -webkit-mask: url("/images/icons/warning-icon.svg") center / contain no-repeat;
    mask: url("/images/icons/warning-icon.svg") center / contain no-repeat;
}

/* ---- Orchestrators area tabs (list | imports) ---- */
.page-tabs {
    display: flex;
    gap: 1.5rem;
    border-bottom: 1px solid #E5E7EB;
    margin-top: 0.5rem;
}

.page-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 0.1rem;
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
    color: var(--rz-text-secondary-color);
    font-size: 0.95rem;
    text-decoration: none;
}

.page-tab:hover {
    color: var(--rz-text-color);
}

.page-tab:focus-visible {
    outline: 2px solid var(--rz-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

.page-tab--active,
.page-tab--active:hover {
    color: var(--rz-text-color);
    font-weight: 600;
    border-bottom-color: var(--rz-primary);
}

.page-tab-count {
    min-width: 1.25rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: var(--rz-primary-lighter, #EEF0FF);
    color: var(--rz-primary);
    font-size: 0.72rem;
    font-weight: 600;
    text-align: center;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .page-tabs {
    border-bottom-color: #4B4957;
}

/* ---- Company / user id bar of the imports tab ---- */
.import-ids-bar.rz-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.5rem;
    padding: 1.1rem 1.25rem !important;
}

/* Same width as the list tables. */
.main-body .import-ids-bar {
    width: 75vw;
    max-width: 100%;
}

@media (max-width: 1280px) {
    .main-body .import-ids-bar {
        width: 100%;
    }
}

.import-ids-hint {
    margin-left: auto;
    color: var(--rz-text-tertiary-color, #7A7E8C);
    font-size: 0.8rem;
}

.copyable-id {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.copyable-id-label {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.copyable-id-box {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    padding: 0.5rem 0.5rem 0.5rem 0.9rem;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    background: #F4F6FA;
}

.copyable-id-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.8rem;
}

.import-source-pill {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--rz-code-font-family, monospace);
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .copyable-id-box {
    background: rgba(255, 255, 255, 0.06);
    border-color: #4B4957;
}

/* ---- Import page: stepper, two-column layout, cards, rows ---- */
.import-header-sub {
    color: var(--rz-text-tertiary-color, #7A7E8C);
    font-size: 0.85rem;
}

.import-stepper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.5rem 0 0.25rem;
}

.import-step {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--rz-text-secondary-color);
    font-size: 0.9rem;
}

.import-step-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid #D9DCE3;
    border-radius: 999px;
    background: var(--rz-card-background-color, #fff);
    font-size: 0.8rem;
}

.import-step-dot .rzi {
    font-size: 1rem;
}

.import-step--active {
    color: var(--rz-text-color);
    font-weight: 600;
}

.import-step--active .import-step-dot {
    border-color: var(--rz-primary);
    background: var(--rz-primary);
    color: #fff;
}

.import-step--done .import-step-dot {
    border-color: transparent;
    background: var(--rz-primary-lighter, #EEF0FF);
    color: var(--rz-primary);
}

.import-step-line {
    width: 72px;
    height: 1px;
    background: #D9DCE3;
}

.import-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(280px, 1fr);
    gap: 1rem;
    align-items: start;
}

.import-main,
.import-aside {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

@media (max-width: 1100px) {
    .import-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

.import-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.import-actions--split {
    justify-content: space-between;
}

.import-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: var(--rz-text-secondary-color);
    font-size: 0.8rem;
    line-height: 1.4;
}

.import-note .rzi {
    font-size: 1rem;
    flex-shrink: 0;
}

.import-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    background: #F4F6FA;
}

.import-row + .import-row {
    margin-top: 0.5rem;
}

.import-row-title {
    font-size: 0.875rem;
    font-weight: 600;
}

.import-row-text {
    color: var(--rz-text-secondary-color);
    font-size: 0.8rem;
    line-height: 1.4;
}

.import-row-sub {
    margin-top: 0.35rem;
}

.import-subheading {
    margin: 0.9rem 0 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.import-meta dt::first-letter {
    text-transform: uppercase;
}

.import-meta dt {
    color: var(--rz-text-tertiary-color, #7A7E8C);
    font-size: 0.75rem;
}

.import-meta dd {
    margin: 0 0 0.6rem;
    font-size: 0.875rem;
}

.import-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.import-choice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    cursor: pointer;
}

.import-choice + .import-choice {
    margin-top: 0.6rem;
}

.import-choice:hover:not(.import-choice--disabled) {
    border-color: var(--rz-primary);
}

.import-choice:focus-visible {
    outline: 2px solid var(--rz-primary);
    outline-offset: 2px;
}

.import-choice--selected {
    border-color: var(--rz-primary);
    background: var(--rz-primary-lighter, #EEF0FF);
}

.import-choice--disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.import-choice-radio {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    border: 2px solid #9CA3AF;
    border-radius: 999px;
}

.import-choice--selected .import-choice-radio {
    border: 5px solid var(--rz-primary);
}

.import-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.75rem;
}

.import-field-label {
    font-size: 0.85rem;
    font-weight: 500;
}

.import-field-hint {
    color: var(--rz-text-tertiary-color, #7A7E8C);
    font-size: 0.8rem;
}

.import-field-hint--warning {
    color: var(--rz-warning);
}

.import-check-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.import-check-item + .import-check-item {
    margin-top: 0.75rem;
}

.import-check-item .rzi {
    margin-top: 2px;
    font-size: 1rem;
    color: var(--rz-success);
}

.import-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 10px;
}

.import-banner--success {
    background: #E6F5EC;
    color: var(--rz-text-color);
}

.import-banner--success .import-banner-title,
.import-banner--success .rzi {
    color: #067647;
}

.import-banner-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.import-banner-text {
    font-size: 0.85rem;
}

.import-todo {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.import-todo + .import-todo {
    margin-top: 0.75rem;
}

.import-todo-num {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--rz-primary-lighter, #EEF0FF);
    color: var(--rz-primary);
    font-size: 0.75rem;
    font-weight: 600;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .import-step-dot {
    border-color: #4B4957;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .import-step-line {
    background: #4B4957;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .import-row {
    background: rgba(255, 255, 255, 0.06);
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .import-choice {
    border-color: #4B4957;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .import-choice--selected {
    border-color: var(--rz-primary);
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .import-banner--success {
    background: #1E3D2E;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .import-banner--success .import-banner-title,
:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .import-banner--success .rzi {
    color: #6EE7A8;
}

/* ---- Export dialog ---- */
.export-dialog-intro {
    color: var(--rz-text-secondary-color);
    font-size: 0.875rem;
}

.export-dialog-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 1rem;
}

.export-dialog-section-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.export-toggle-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid #E5E7EB;
}

.export-toggle-row + .export-toggle-row {
    margin-top: 0;
    border-top: 0;
}

.export-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #E5E7EB;
}

.export-ready-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.export-ready-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: #DDF7F1;
    color: #0F9F85;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .export-toggle-row,
:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .export-dialog-footer {
    border-color: #4B4957;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .export-ready-icon {
    background: #1F4A42;
    color: #6EE7C8;
}

/* ---- Redesigned action buttons: the dark of the orchestrator Save ---- */
.rz-button.btn-dark-soft {
    background-color: #4B5057 !important;
    color: #fff !important;
}

.rz-button.btn-dark-soft:hover:not(:disabled),
.rz-button.btn-dark-soft:active:not(:disabled) {
    background-color: #303439 !important;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .rz-button.btn-dark-soft {
    background-color: #5A5F6B !important;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .rz-button.btn-dark-soft:hover:not(:disabled) {
    background-color: #6B7180 !important;
}

/* Fully rounded badges. */
.status-pill.status-pill--round {
    padding: 0.15rem 0.65rem;
    border-radius: 999px;
}

/* Two-option segmented control (new topic / existing topic). */
.import-segmented {
    display: inline-flex;
    gap: 0.25rem;
    padding: 0.25rem;
    border-radius: 10px;
    background: #F4F6FA;
}

.import-segmented-item {
    padding: 0.4rem 1rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--rz-text-color);
    font: inherit;
    font-size: 0.875rem;
    cursor: pointer;
}

.import-segmented-item:hover:not(:disabled):not(.import-segmented-item--active) {
    background: rgba(0, 0, 0, 0.04);
}

.import-segmented-item:focus-visible {
    outline: 2px solid var(--rz-primary);
    outline-offset: 1px;
}

.import-segmented-item:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.import-segmented-item--active,
.import-segmented-item--active:hover {
    background: var(--rz-primary-lighter, #EEF0FF);
    color: var(--rz-primary);
    font-weight: 500;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .import-segmented {
    background: rgba(255, 255, 255, 0.06);
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .import-segmented-item:hover:not(:disabled):not(.import-segmented-item--active) {
    background: rgba(255, 255, 255, 0.08);
}

/* ---- Toolbar search box with a magnifier ---- */
.toolbar-search {
    position: relative;
    width: 500px;
    max-width: 100%;
}

.toolbar-search .toolbar-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--rz-text-secondary-color);
    pointer-events: none;
    z-index: 1;
}

.toolbar-search .toolbar-search-input.rz-textbox {
    padding-left: 2.5rem;
}

/* ---- Warning alerts: one look everywhere (amber of the Preview badge, project warning icon) ---- */
.rz-alert.rz-warning {
    padding: 0.85rem 1rem !important;
    border-radius: 10px !important;
    background-color: #FFF9EC !important;
    color: #B45309 !important;
    font-size: 0.8125rem !important;
}

.rz-alert.rz-warning .rz-alert-message,
.rz-alert.rz-warning .rz-alert-title {
    color: inherit !important;
    font-size: inherit !important;
}

.rz-alert.rz-warning .rz-alert-icon {
    flex: none;
    width: 1.15rem;
    height: 1.15rem;
    font-size: 0 !important;
    background-color: currentColor;
    -webkit-mask: url("/images/icons/warning-icon.svg") center / contain no-repeat;
    mask: url("/images/icons/warning-icon.svg") center / contain no-repeat;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .endpoint-scope-badge,
:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .endpoint-embed-empty {
    background-color: color-mix(in srgb, var(--rz-text-color) 10%, transparent);
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .rz-button.endpoint-icon-square {
    color: var(--rz-text-color);
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .endpoint-warning-banner {
    background-color: rgba(245, 158, 11, 0.15);
    color: #FBBF24;
}

/* ---- A2A published endpoints ---- */

.a2a-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.a2a-empty {
    color: var(--rz-text-color);
    padding: 0.25rem 0.35rem;
}

.a2a-row {
    display: grid;
    grid-template-columns: 5.5rem minmax(8rem, 1.4fr) minmax(8rem, 1.2fr) 4rem 9.5rem 8.5rem auto;
    align-items: center;
    gap: 1rem;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    background-color: #F6F7FB;
    font-size: 0.8125rem;
}

.a2a-row .status-pill {
    justify-self: start;
}

/* No endpoints yet: one grey row with the publish action at its end. */
.a2a-row.a2a-row--empty {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0.75rem;
}

.a2a-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.a2a-slug {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
    color: var(--rz-text-secondary-color);
}

.a2a-version,
.a2a-expiry {
    color: var(--rz-text-secondary-color);
    white-space: nowrap;
}

.a2a-pill-icon.rzi {
    font-size: 0.85rem;
}

/* Separator between the endpoint info and its actions. */
.a2a-actions {
    display: inline-flex;
    align-items: center;
    justify-self: end;
    align-self: stretch;
    padding-left: 1rem;
    border-left: 1px solid #D9DCE3;
}

.a2a-publish-new.rz-button {
    align-self: flex-start;
}

.a2a-list {
    container-type: inline-size;
}

/* Narrow card: the row wraps instead of pushing the actions out. */
@container (max-width: 62rem) {
    .a2a-row:not(.a2a-row--empty) {
        display: flex;
        flex-wrap: wrap;
        row-gap: 0.5rem;
    }

    .a2a-name {
        flex: 1 1 10rem;
    }

    .a2a-slug {
        flex: 1 1 8rem;
        min-width: 0;
    }

    .a2a-actions {
        margin-left: auto;
    }
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .a2a-actions {
    border-left-color: #4B4957;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .a2a-row {
    background-color: color-mix(in srgb, var(--rz-text-color) 7%, transparent);
}

/* ---- A2A dialogs: publish and key ---- */

.detail-dialog.a2a-dialog .rz-dialog-content {
    padding: 0;
}

/* The intro sits right under the title, with no separator. */
.detail-dialog.a2a-dialog .rz-dialog-titlebar {
    border-bottom: 0;
    padding: 1.5rem 1.5rem 0.25rem;
}

.a2a-dialog-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0 1.5rem 1.25rem;
}

.a2a-field .rz-label {
    font-weight: 600;
}

.a2a-datepicker.rz-datepicker,
.a2a-datepicker .rz-inputtext,
#a2aExpiration {
    border-radius: 10px;
}

.a2a-datepicker .rz-datepicker-trigger {
    border-radius: 0 10px 10px 0;
}

.a2a-dialog-intro {
    margin: 0;
    color: var(--rz-text-secondary-color);
}

.a2a-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
    flex: 1 1 auto;
}

.a2a-field-row {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.a2a-field--version {
    flex: 0 0 9rem;
}

.a2a-field-hint {
    margin: 0;
    color: var(--rz-text-secondary-color);
}

.a2a-dialog-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--rz-text-secondary-color);
}

.a2a-dialog-note .rzi {
    font-size: 1.1rem;
}

.a2a-copy-row {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

.a2a-copy-row .rz-button {
    flex: 0 0 auto;
    white-space: nowrap;
}

.a2a-code-box {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    background-color: #F6F7FB;
    font-size: 0.8125rem;
    overflow-wrap: anywhere;
}

.a2a-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #D9DCE3;
}

.a2a-dialog-footer--split {
    justify-content: space-between;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .a2a-code-box {
    border-color: #4B4957;
    background-color: color-mix(in srgb, var(--rz-text-color) 7%, transparent);
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .a2a-dialog-footer {
    border-top-color: #4B4957;
}

/* A2A dialogs: same lighter Dark as the primary action of the detail header. */
.detail-dialog.a2a-dialog .rz-button.rz-dark.rz-variant-flat:not(.rz-state-disabled) {
    background-color: #4B5057;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .rz-alert.rz-warning {
    background-color: rgba(245, 158, 11, 0.15) !important;
    color: #FBBF24 !important;
}

/* ---- Notifications: long messages wrap instead of leaving the box ---- */
.rz-notification-item .rz-notification-message,
.rz-notification-item .rz-notification-content {
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
}


/* ---- Typed identifiers as badges ---- */
.chips-input {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 0.4rem;
    min-height: 5.25rem;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--rz-base-300, #e5e7eb);
    border-radius: 10px;
    background-color: var(--rz-input-background-color, #f9fafb);
    cursor: text;
}

.chips-input--focused {
    border-color: var(--rz-primary);
}

.chips-input-chip {
    max-width: 100%;
    gap: 0.35rem;
    cursor: default;
}

.chips-input-chip:focus-visible {
    outline: 2px solid var(--rz-primary);
    outline-offset: 1px;
}

.chips-input-chip-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chips-input-remove {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.chips-input-remove .rzi {
    font-size: 0.9rem;
}

.chips-input-field {
    flex: 1 1 8rem;
    min-width: 8rem;
    padding: 0.15rem 0.1rem;
    border: 0;
    outline: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 0.875rem;
}

/* ---- Export dialog: no title bar, own header and close button ---- */
.export-dialog .rz-dialog-content {
    position: relative;
}

.export-dialog-body {
    position: relative;
}

.export-dialog .export-dialog-close {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
}

.export-dialog-title {
    padding-right: 2rem;
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
    font-weight: 600;
}

.export-ready-header .export-ready-icon .rzi {
    font-size: 1.75rem;
}

.export-ready-title {
    font-size: 1.35rem;
    font-weight: 600;
}

.export-ready-text {
    margin-top: 0.15rem;
    color: var(--rz-text-secondary-color);
    font-size: 0.95rem;
    line-height: 1.45;
}

.export-ready-section-title {
    font-size: 1.05rem;
    font-weight: 600;
}

.export-group {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: #F4F6FA;
}

.export-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.export-group .import-row-text + .import-row-text {
    margin-top: 0.25rem;
}

.import-note--success .rzi {
    color: #067647;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .export-group {
    background: rgba(255, 255, 255, 0.06);
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .import-note--success .rzi {
    color: #6EE7A8;
}

/* ---- Import: one approval step per row, name on the left and the field on the right ---- */
.import-approver-row {
    display: grid;
    grid-template-columns: minmax(120px, 220px) minmax(0, 420px);
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
}

@media (max-width: 700px) {
    .import-approver-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.35rem;
    }
}

/* ---- Health banner (expired / expiring agents) and field hint ---- */

.rz-card.rz-variant-flat.health-banner {
    --health-bg: #FEF3C7;
    --health-fg: #B45309;
    background-color: var(--health-bg);
    color: var(--rz-text-color);
    box-shadow: none;
    margin-bottom: 1rem;
    max-width: 100%;
}

.rz-card.rz-variant-flat.health-banner--error {
    --health-bg: #FEE2E2;
    --health-fg: #DC2626;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .rz-card.rz-variant-flat.health-banner {
    --health-bg: #4D3B16;
    --health-fg: #FCD34D;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .rz-card.rz-variant-flat.health-banner--error {
    --health-bg: #4C2427;
    --health-fg: #FCA5A5;
}

.health-banner .health-banner-header,
.health-banner .health-banner-title.rz-text-subtitle1 {
    color: var(--health-fg);
}

.health-banner-title {
    margin: 0;
    font-weight: 600;
}

.health-banner-hint {
    margin: 0;
    font-size: 0.875rem;
}

.health-banner-hint {
    color: var(--rz-text-secondary-color);
}

.health-banner-list {
    margin: 0.125rem 0 0;
    padding-left: 1.2rem;
}

/* Helper text under a dropdown that points at an expired or switched-off agent. */
.health-field-hint {
    color: #B45309;
}

.health-field-hint--error {
    color: #DC2626;
}

.health-field-hint .rz-text-caption {
    color: inherit;
}

.health-field-hint .rzi {
    font-size: 1rem;
    line-height: 1.3;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .health-field-hint {
    color: #FCD34D;
}

:is(.rz-material-dark, body:has(.rz-layout.rz-material-dark)) .health-field-hint--error {
    color: #FCA5A5;
}

/* ---- Detail pages: same left gutter (2.5rem, as the breadcrumb and the main list pages) and no extra top offset ---- */

.main-body .detail-page {
    padding: 0 2.5rem 1rem 2.5rem !important;
}

.main-body .detail-page .detail-page-header {
    padding-top: 0.25rem;
}

@media (max-width: 767px) {
    .main-body .detail-page {
        padding: 0 1rem 1rem 1rem !important;
    }
}

/* Large screens: the settings fill the card, stopping just short of its right edge. */
@media (min-width: 1280px) {
    .settings-card-body {
        max-width: calc(100% - 1.5rem);
    }
}
