#view-ai .ai-row,
#view-rules .ai-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
}

#view-ai .ai-row:hover,
#view-rules .ai-row:hover {
    background: rgba(59, 130, 246, 0.05);
}

#view-ai .ai-left,
#view-rules .ai-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

#view-ai .ai-right,
#view-rules .ai-right {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

#view-ai .ai-row:not(:last-child),
#view-rules .ai-row:not(:last-child) {
    border-bottom: 1px solid #eee;
}

#view-ai .ai-icon,
#view-rules .ai-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--chat-bg-ai);

    flex-shrink: 0;
}

#view-ai .ai-icon svg,
#view-rules .ai-icon svg {
    width: 20px;
    height: 20px;
}


/* PRZYCISKI */
#view-ai .edit-btn,
#view-ai .delete-btn,
#view-rules .edit-btn,
#view-rules .delete-btn {
    background: transparent;
    border: 1px solid var(--card-border);
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-right: 3px;
}

#view-ai .edit-btn,
#view-rules .edit-btn {
    color: var(--text-primary);
}

#view-ai .edit-btn:hover,
#view-rules .edit-btn:hover {
    background: #f8fafc;
    border-color: var(--color-blue-600);
}

#view-ai .delete-btn {
    color: var(--color-red-600);
}

#view-ai .delete-btn:hover {
    background: #fef2f2;
    border-color: var(--color-red-600);
}


/* DRAG */
#view-ai .ai-drag {
    cursor: grab;
    font-size: 14px;
    color: #94a3b8;
    user-select: none;
}

#view-ai[data-routing-mode="simple"] .ai-drag {
    display: none;
}


/* AVATAR - ASSISTENT NEW - EDIT  */
.sx-avatar-box {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sx-avatar-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sx-avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.2s;
}

.sx-avatar-box:hover .sx-avatar-overlay {
    opacity: 1;
}

/* button back */
.btn-ghost {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-color);

    padding: 10px 38px;
    font-size: 13px;
    border-radius: 8px;

    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-ghost:hover {
    background: var(--state-hover-bg);
    border-color: var(--state-hover-border);
}


/* TIME INPUT — COMPACT (ASSISTANT HOURS) */
#assistantScheduleBox .sx-row {
    flex-wrap: nowrap;
}

#assistantScheduleBox .sx-row-end {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

#assistantScheduleBox .time-separator {
    width: 10px;
    height: 1px;
    background: var(--text-secondary);
}

/* 🔥 HOURS DISABLED STATE */
#assistantWorkingDaysContainer.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* opcjonalnie lekki efekt wizualny */
#assistantWorkingDaysContainer.disabled .sx-card {
    background: #f9fafb;
}

/* tekst mniej kontrastowy */
#assistantWorkingDaysContainer.disabled .sx-card-title,
#assistantWorkingDaysContainer.disabled .setting-row-description {
    color: #9ca3af;
}



/* ROUTING INPUT — COMPACT  */
/* KOLEJNOŚĆ */
[data-tab="routing"] #assistantPriority {
    min-width: 0;
    width: 70px;
    flex: 0 0 70px;
}

/* ROLA */
[data-tab="routing"] #assistantRole {
    min-width: 0;
    width: 120px;
    flex: 0 0 120px;
}

/* LIMIT */
[data-tab="routing"] #assistantMaxMessages {
    min-width: 0;
    width: 70px;
    flex: 0 0 70px;
}


/* STYLE — COMPACT  */
/* TON */
[data-tab="style"] #assistantTone {
    min-width: 0;
    width: 140px;
    flex: 0 0 140px;
}

/* VERBOSITY */
[data-tab="style"] #assistantVerbosity {
    min-width: 0;
    width: 260px;
    flex: 0 0 260px;
}

/* STYL */
[data-tab="style"] #assistantStyle {
    min-width: 0;
    width: 140px;
    flex: 0 0 140px;
}

/* KNOWLEDGE ANTI REGRESSION */
#assistantKnowledgeList .sx-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* PROMOT */
#assistantPrompt {
    width: 100%;
    display: block;
}

.sx-textarea {
    flex: none !important;
}

/* CONFLICT ICON HOURS RANGE */
.range-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 90px;
}

.remove-placeholder {
    display: inline-block;
    width: 48px;
}

.extra-range {
    position: relative;
}

.range-warning {
    margin-left: auto;
}

.range-error {
    background: rgba(255, 0, 0, 0.06);
    border: 1px solid rgba(255, 0, 0, 0.25);
    border-radius: 8px;
}

.settings-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sx-warning {
    font-size: 12px;
    color: #b45309;
}

.sx-section {
    position: relative;
}


/* ONLY FOR ASSISTANTS EDIT/NEW HOURS SITE DOWN MARGIN LAST OBJECT */
#assistantWorkingDaysContainer {
    margin-bottom: 0;
}

#assistantWorkingDaysContainer>.sx-card:last-child {
    margin-bottom: 0;
}

/* assistents list badges  */
.ai-badge-empty {
    visibility: hidden;
    width: 24px;
    /* dopasuj do ⚠ */
}


/* 🔹 GRUPY SZEROKOŚCI */

.ai-badge--status {
    width: 65px;
}

/* Active / Inactive */
.ai-badge--online {
    width: 40px;
}

/* Online / Offline */
.ai-badge--hours {
    width: 40px;
}

/* Limit messages */
.ai-badge--limit {
    width: 65px;
}

/* Style */
.ai-badge--style {
    width: 65px;
}

/* Knowledge */
.ai-badge--kb {
    width: 65px;
}

/* Usage */
.ai-badge--use {
    width: 80px;
}

/* KNOWLEDGE — fixed layout (jak assistants) */

/* Type knowledge */
.ai-badge--type {
    width: 65px;
}

/* Knowledge usadge */
.ai-badge--assigned {
    width: 65px;
}


/* priority */
.ai-badge--prio {
    background: #EEF2FF;
    color: #3730A3;
    font-weight: 600;
}

/* style 
.ai-badge--style {
    background: #F3F4F6;
    color: #374151;
} */

/* P1 */
.ai-badge--warn {
    width: 30px;
}

/* ⚠ */
.ai-badge--empty {
    width: 30px;
    visibility: hidden;
}

/* 🔹 INFO */
.ai-badge--hours,
.ai-badge--limit,
.ai-badge--style,
.ai-badge--kb:not(.ai-badge-error),
.ai-badge--type,
.ai-badge--use,
.ai-badge--assigned {
    background: #F1F3F5;
    color: #343A40;
}


/* KNOWLEDGE — badge row alignment */
.ai-left .setting-row-description {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ai-actions-switch {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 60px;
}


.routing-priority-disabled {
    opacity: 0.3;
}

/* ================= AI CENTER — PROGRESS ================= */
.ai-progress {
    margin-top: 6px;
    background: #eee;
    border-radius: 6px;
    height: 6px;
    overflow: hidden;
}

.ai-progress-bar {
    height: 100%;
    width: 0%;
    background: #1565C0;
    transition: width 0.3s ease;
}

/* kolory */
.ai-progress-bar.low {
    background: #1565C0;
}

.ai-progress-bar.medium {
    background: #f9a825;
}

.ai-progress-bar.high {
    background: #d32f2f;
}

/* warning */
.ai-warning {
    color: #d32f2f;
    font-size: 12px;
    margin-top: 4px;
}


/* ================= AI CENTER BADGES ================= */
/* STATUS */
.ai-center-badge-active {
    background: #DCFCE7;
    color: #166534;
    font-weight: 600;
}

.ai-center-badge-inactive {
    background: #FDECEA;
    color: #B02A37;
    font-weight: 600;
}

/* INFO (tryb, fallback, strategia) */
.ai-center-badge {
    background: #F1F3F5;
    color: #343A40;
}

/* WSPÓLNE */
.ai-center-badge,
.ai-center-badge-active,
.ai-center-badge-inactive {
    min-width: 100px;
    text-align: center;
}


/* ================= AI DOT ================= */
.ai-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-right: 6px;
}

.ai-dot-online {
    background: #22C55E;
}

.ai-dot-offline {
    background: #9CA3AF;
}

/* ================= STATISTICS ================= */

/* kontener prawej strony */
.ai-usage-block {
    min-width: 220px;
}

/* top: użyto / limit */
.ai-usage-top {
    margin-bottom: 6px;
}

/* mniej ważny tekst (limit po prawej) */
.ai-usage-muted {
    color: var(--text-secondary);
}

/* pasek */
.ai-usage-bar {
    position: relative;
    width: 220px;
    height: 8px;
    background: #eee;
    border-radius: 8px;
    overflow: visible;
}

/* fill */
.ai-usage-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 0.3s ease;
    z-index: 1;
}

/* kolory skali (zostają) */
.ai-usage-fill.low {
    background: #4CAF50;
}

.ai-usage-fill.medium {
    background: #FFC107;
}

.ai-usage-fill.high {
    background: #F44336;
}

/* status NA pasku */
.ai-usage-status {
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: #d32f2f;
    margin-top: 4px;
}

/* kropka statusu (enterprise detail) */
.ai-usage-status::before {
    content: '● ';
    font-size: 10px;
}

/* stany */
.ai-usage-status--warn {
    color: #f57c00;
}

.ai-usage-status--max {
    color: #d32f2f;
}

.ai-badge-usage .usage-value {
    display: inline-block;
    min-width: 25px;
    /* 👈 STAŁA SZEROKOŚĆ */
    text-align: right;
    /* 👈 wyrównanie liczb */
}


/* =======================================================
   AI CENTER — STATUS REDESIGN CLONE
======================================================= */

.ai-center-hero {
    padding: 24px;
}

.ai-center-hero .ai-center-hero-layout {
    display: grid;
    grid-template-columns: 1fr 240px;
    align-items: center;
    gap: 32px;
}

.ai-center-hero .ai-center-hero-content {
    min-width: 0;
}

.ai-center-hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;

    transform: translateY(32px);
}

.ai-center-hero .ai-center-bot-image {
    width: 190px;
    max-width: 100%;
    height: auto;
    display: block;
}





/* =======================================================
   AI CENTER — STATUS ITEMS
======================================================= */

.ai-center-hero {
    padding: 14px 20px;
    border-radius: var(--radius-md);
}

.ai-center-hero .ai-center-hero-layout {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 12px;
    align-items: center;
}

.ai-center-hero .ai-center-hero-heading {
    font-size: 18px;
    font-weight: 700;
    color: #111827;

    margin-bottom: 18px;
}

.ai-center-hero .ai-center-hero-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-center-hero .ai-center-hero-item {
    display: grid;
    grid-template-columns: 42px 1fr auto;

    align-items: center;
    gap: 10px;
}

.ai-center-hero .ai-center-hero-icon {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    color: rgba(59, 130, 246, 0.95);

    border: 1px solid rgba(59, 130, 246, 0.45);

    border-radius: var(--radius-md);
}

.ai-center-hero .ai-center-hero-icon svg {
    width: 20px;
    height: 20px;
}

.ai-center-hero .sx-card-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;

    margin: 0;
}

.ai-center-hero .setting-row-description {
    margin-top: 3px;

    font-size: 12px;
    line-height: 1.45;

    color: var(--text-secondary);
}

.ai-center-hero .badge-ui {
    min-width: 112px;
    height: 30px;

    border-radius: 10px;
}

.ai-center-hero .ai-center-hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-center-hero .ai-center-bot-image {
    width: 135px;
    opacity: 0.92;
    height: auto;
    display: block;
}


/* =======================================================
   AI CENTER — PREMIUM BADGES
======================================================= */

.ai-center-hero .badge-ai-center {
    min-width: 118px;
    height: 28px;

    padding: 0 14px;

    border-radius: var(--radius-md);

    font-size: 11px;
    font-weight: 600;

    background: rgba(248, 250, 252, 0.95);
    color: #334155;

    border: 1px solid rgba(148, 163, 184, 0.22);

    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 1),
        0 1px 2px rgba(15, 23, 42, 0.03);

    transform: none;
}

.ai-center-hero .badge-ai-center:hover {
    transform: none;
}


.ai-center-hero .badge-ai-center.badge-success {
    background: #DCFCE7;
    color: #166534;
    border-color: rgba(22, 101, 52, 0.14);
}

.ai-center-hero .badge-ai-center.badge-danger {
    background: #FDECEA;
    color: #B02A37;
    border-color: rgba(176, 42, 55, 0.14);
}

.ai-center-hero .badge-ai-center.badge-priority {
    background: color-mix(in srgb, var(--chat-bg-ai) 10%, white);
    color: var(--chat-bg-ai);
    border-color: color-mix(in srgb, var(--chat-bg-ai) 18%, transparent);
}

.ai-center-hero .badge-ai-center.badge-priority {
    background: #EEF2FF;
    color: #3730A3;
    border-color: rgba(55, 48, 163, 0.14);
}

.ai-center-hero .badge-ai-center.badge-neutral {
    background: rgba(248, 250, 252, 0.95);
    color: #334155;
    border-color: rgba(148, 163, 184, 0.22);
}


/* =======================================================
   AI CENTER — USAGE PANEL
======================================================= */

.ai-center-usage-panel {
    padding: 22px;

    border-radius: var(--radius-md);
}

/* ================= HEADER ================= */

.ai-center-usage-panel .ai-center-usage-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 32px;

    margin-bottom: 18px;
}

/* ================= METER ================= */

.ai-center-usage-panel .ai-center-usage-meter {
    width: 460px;
    max-width: 100%;
}

.ai-center-usage-panel .ai-center-usage-meter-top {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 10px;
}

.ai-center-usage-panel .ai-center-usage-bar {
    position: relative;

    width: 100%;
    height: 12px;

    overflow: hidden;

    border-radius: 999px;

    background: #ECEFF3;
}

.ai-center-usage-panel .ai-center-usage-fill {
    height: 100%;
    width: 0%;

    border-radius: 999px;

    transition: width 0.3s ease;

    background: linear-gradient(90deg,
            #22C55E 0%,
            #16A34A 100%);
}

.ai-center-usage-panel .ai-center-usage-status {
    margin-top: 8px;

    font-size: 12px;
    color: #64748B;
}

/* ================= CARDS ================= */

.ai-center-usage-panel .ai-center-usage-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 12px;
}

.ai-center-usage-panel .ai-center-usage-card {
    position: relative;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.14);
    background:
        linear-gradient(180deg,
            rgba(255, 255, 255, 0.96) 0%,
            rgba(248, 250, 252, 0.96) 100%);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 1px 2px rgba(15, 23, 42, 0.03);
}

.ai-center-usage-panel .ai-center-usage-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;

    color: #0F172A;

    margin-bottom: 8px;
}

.ai-center-usage-panel .ai-center-usage-label {
    font-size: 12px;
    line-height: 1.45;

    color: #64748B;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 1200px) {

    .ai-center-usage-panel .ai-center-usage-header {
        flex-direction: column;
    }

    .ai-center-usage-panel .ai-center-usage-meter {
        width: 100%;
    }
}

@media (max-width: 900px) {

    .ai-center-usage-panel .ai-center-usage-cards {
        grid-template-columns: 1fr;
    }
}


/* =======================================================
   AI CENTER — ASSISTANTS PANEL
======================================================= */

.ai-assistants-panel {
    padding: 22px;

    border-radius: var(--radius-md);
}

/* ================= HEADER ================= */

.ai-assistants-panel .sx-card-title,
.ai-knowledge-panel .sx-card-title {
    font-weight: 700;
}

.ai-routing-panel>.sx-row>.setting-row-info>.sx-card-title {
    font-weight: 700;
}

/* ================= LIST ================= */

.ai-assistants-list {
    display: flex;
    flex-direction: column;

    margin-top: 18px;
}

.ai-assistant-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 24px;

    padding: 12px 4px;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;

    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}


.ai-assistant-row:hover {
    background: rgba(59, 130, 246, 0.05);
}


.ai-assistant-row:last-child {
    border-bottom: 0;
}

/* ================= LEFT ================= */

.ai-assistant-left,
.ai-knowledge-left {
    display: flex;
    align-items: center;

    gap: 14px;

    min-width: 0;
}

.ai-assistant-icon,
.ai-knowledge-icon {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    color: #7C5CFC;

    border: 1px solid rgba(124, 92, 252, 0.95);

    border-radius: var(--radius-md);

    background:
        linear-gradient(180deg,
            rgba(255, 255, 255, 0.96) 0%,
            rgba(248, 250, 252, 0.96) 100%);
}

.ai-assistant-icon svg,
.ai-knowledge-icon svg {
    width: 25px;
    height: 25px;
}

.ai-assistant-content,
.ai-knowledge-content {
    min-width: 0;
}

.ai-assistant-name,
.ai-knowledge-name {
    font-size: 13px;
    font-weight: 600;

    color: #0F172A;

    margin-bottom: 4px;
}

.ai-assistant-description,
.ai-knowledge-description {
    font-size: 12px;
    color: #64748B;
}

/* ================= RIGHT ================= */

.ai-assistant-right,
.ai-knowledge-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 10px;

    flex-wrap: wrap;
}

/* ================= PREMIUM BADGES ================= */

.badge-assistant-presence,
.badge-assistant-usage,
.badge-assistant-conflict {
    height: 25px;

    min-width: 70px;

    padding: 0 14px;

    border-radius: var(--radius-md);

    font-size: 11px;
    font-weight: 600;

    border: 1px solid transparent;

    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 1),
        0 1px 2px rgba(15, 23, 42, 0.03);
}

/* ONLINE */

.badge-assistant-presence,
.badge-knowledge-presence {
    display: inline-flex;
    align-items: center;
    gap: 6px;

}

.badge-assistant-presence .badge-dot,
.badge-knowledge-presence .badge-knowledge-dot {
    width: 8px;
    height: 8px;

    border-radius: 999px;
}

.badge-assistant-presence.is-online,
.badge-knowledge-presence.is-online {
    background: #ECFDF3;
    color: #16A34A;

    border-color: rgba(22, 163, 74, 0.14);
}

.badge-assistant-presence.is-online .badge-dot,
.badge-knowledge-presence.is-online .badge-knowledge-dot {
    background: #22C55E;
}

.badge-assistant-presence.is-offline,
.badge-knowledge-presence.is-offline {
    background: #FEF2F2;
    color: #DC2626;

    border-color: rgba(220, 38, 38, 0.14);
}

.badge-assistant-presence.is-offline .badge-dot,
.badge-knowledge-presence.is-offline .badge-knowledge-dot {
    background: #EF4444;
}

/* USAGE */

.badge-assistant-usage {
    display: inline-grid;
    grid-template-columns: 1fr 32px;
    align-items: center;
    column-gap: 8px;
    text-align: left;
    border-color: rgba(100, 116, 139, 0.20);
}

.badge-assistant-usage-value {
    display: inline-block;
    min-width: 32px;
    text-align: right;
    font-weight: 700;
    color: #0F172A;
}

/* CONFLICT */

.badge-assistant-conflict {
    margin-right: 30px;

    background: #FFF1F2;
    color: #E11D48;

    border-color: rgb(225, 29, 71);

    box-shadow:
        0 0 0 1px rgba(225, 29, 72, 0.04);
}

/* ROUTING PRIORITY */

.badge-routing-priority {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 140px;
    height: 25px;

    padding: 0 14px;

    border-radius: var(--radius-md);

    font-size: 11px;
    font-weight: 600;

    background: #EEF2FF;
    color: #3730A3;

    border: 1px solid rgba(55, 48, 163, 0.14);

    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 1),
        0 1px 2px rgba(15, 23, 42, 0.03);
}

/* =======================================================
   AI ASSISTANTS — COLLAPSE HEADER
======================================================= */

.ai-assistants-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 24px;
}

.ai-assistants-toggle {
    height: 30px;

    padding: 0 14px;

    border: 1px solid rgba(148, 163, 184, 0.18);

    border-radius: var(--radius-md);

    background:
        linear-gradient(180deg,
            rgba(255, 255, 255, 0.96) 0%,
            rgba(248, 250, 252, 0.96) 100%);

    color: #475569;

    font-size: 11px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        0 1px 2px rgba(15, 23, 42, 0.03);
}

.ai-assistants-toggle:hover {
    background: rgba(59, 130, 246, 0.05);

    border-color: rgba(59, 130, 246, 0.18);
}

/* =======================================================
   AI ASSISTANTS — COLLAPSED MODE
======================================================= */

.ai-assistants-panel {
    transition:
        padding 0.18s ease,
        border-color 0.18s ease;
}

/* wrapper */
.ai-assistants-panel #aiOverviewAssistants {
    display: flex;
    flex-direction: column;
}

.ai-assistants-panel[data-collapsed="true"] #aiOverviewAssistants {
    position: relative;

    max-height: 112px;

    overflow: hidden;
}

.ai-assistants-panel[data-collapsed="true"] #aiOverviewAssistants::after {
    content: '';

    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 42px;

    pointer-events: none;

    background:
        linear-gradient(to bottom,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.82) 45%,
            rgba(255, 255, 255, 1) 100%);
}

/* =======================================================
   ASSISTANTS — NEW ROW LAYOUT
======================================================= */

#view-ai #assistantsList .ai-assistant-row,
#view-ai #knowledgeList .ai-knowledge-row {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 24px;

}


#view-ai #assistantsList .ai-assistant-row::before,
#view-ai #knowledgeList .ai-knowledge-row::before {
    content: '';
    position: absolute;

    left: 0;
    right: 0;
    top: 0;
    bottom: 1px;

    background: transparent;

    pointer-events: none;
    z-index: 0;
}


#view-ai #assistantsList .ai-assistant-row:hover::before,
#view-ai #knowledgeList .ai-knowledge-row:hover::before {
    background: rgba(59, 130, 246, 0.05);
}

#view-ai #assistantsList .ai-assistant-left,
#view-ai #assistantsList .ai-assistant-right,
#view-ai #knowledgeList .ai-knowledge-left,
#view-ai #knowledgeList .ai-knowledge-right {
    position: relative;

}

#view-ai #assistantsList .ai-assistant-right,
#view-ai #knowledgeList .ai-knowledge-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* badges */
#view-ai #assistantsList .ai-assistant-right .badge-group,
#view-ai #knowledgeList .ai-knowledge-right .badge-group {
    margin-right: 10px;
}

#view-ai #assistantsList .ai-assistant-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

#view-ai #knowledgeList .ai-knowledge-row.is-disabled .ai-knowledge-left,
#view-ai #knowledgeList .ai-knowledge-row.is-disabled .ai-knowledge-badges {
    opacity: 0.30;
}

#view-ai #assistantsList .ai-assistant-row.is-disabled .ai-assistant-left,
#view-ai #assistantsList .ai-assistant-row.is-disabled .ai-assistant-badges {
    opacity: 0.30;
}

#view-ai #assistantsList .ai-assistant-row.is-disabled:hover::before,
#view-ai #knowledgeList .ai-knowledge-row.is-disabled:hover::before {
    background: transparent;
}

/* LIMIT */

.badge-assistant-limit,
.badge-assistant-knowledge,
.badge-assistant-knowledge-empty,
.badge-knowledge-type,
.badge-knowledge-usage {
    display: inline-grid;

    grid-template-columns: 1fr auto;

    align-items: center;

    column-gap: 8px;

    min-width: 70px;
    height: 25px;

    padding: 0 14px;

    border-radius: var(--radius-md);

    font-size: 11px;
    font-weight: 600;

    border: 1px solid transparent;

    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 1),
        0 1px 2px rgba(15, 23, 42, 0.03);
}

/* LIMIT */

.badge-assistant-limit {
    background: #F8FAFC;
    color: #475569;

    border-color: rgba(100, 116, 139, 0.20);
}

.badge-assistant-limit-value {
    min-width: 20px;

    text-align: right;

    font-weight: 700;

    color: #0F172A;
}

/* KNOWLEDGE */

.badge-assistant-knowledge,
.badge-knowledge-usage {
    background: #F8FAFC;
    color: #475569;

    border-color: rgba(100, 116, 139, 0.20);
}

.badge-assistant-knowledge-empty {
    background: #FFF1F2;
    color: #E11D48;

    border-color: rgb(225, 29, 71);
}

.badge-assistant-knowledge-value,
.badge-knowledge-usage-value {
    min-width: 16px;

    text-align: right;

    font-weight: 700;

    color: #0F172A;
}

.badge-knowledge-type-value {
    min-width: 58px;

    text-align: right;

    font-weight: 700;

    color: #0F172A;
}

.badge-knowledge-type {
    background: #EEF6FF;
    color: #1565C0;

    border-color: rgba(21, 101, 192, 0.16);
}

/* =======================================================
   ASSISTANTS — ACTION MENU
======================================================= */

#view-ai #assistantsList .ai-actions,
#view-ai #knowledgeList .ai-actions {
    position: relative;

    display: flex;
    align-items: center;

    gap: 6px;
}


/* dropdown */

#view-ai #assistantsList .ai-actions-menu,
#view-ai #knowledgeList .ai-actions-menu {
    position: absolute;

    top: calc(100% + 8px);
    right: 0;

    min-width: 140px;

    padding: 6px;

    border-radius: var(--radius-md);

    background: #FFFFFF;

    border: 1px solid rgba(148, 163, 184, 0.16);

    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.08),
        0 2px 6px rgba(15, 23, 42, 0.04);

    z-index: 999;

    display: none;
}

/* visible */

#view-ai #assistantsList .ai-actions-menu.is-open,
#view-ai #knowledgeList .ai-actions-menu.is-open {
    display: flex;
    flex-direction: column;
}

/* items */

#view-ai #assistantsList .ai-actions-menu-item,
#view-ai #knowledgeList .ai-actions-menu-item {
    height: 34px;

    display: flex;
    align-items: center;

    padding: 0 12px;

    border: 0;
    background: transparent;

    border-radius: calc(var(--radius-md) - 4px);

    color: #334155;

    font-size: 12px;
    font-weight: 500;

    cursor: pointer;

    transition:
        background 0.15s ease,
        color 0.15s ease;
}

#view-ai #assistantsList .ai-actions-menu-item:hover,
#view-ai #knowledgeList .ai-actions-menu-item:hover {
    background: rgba(59, 130, 246, 0.06);
}

#view-ai #assistantsList .ai-actions-menu-item.is-danger,
#view-ai #knowledgeList .ai-actions-menu-item.is-danger {
    color: #DC2626;
}

#view-ai #assistantsList .ai-actions-menu-item.is-danger:hover,
#view-ai #knowledgeList .ai-actions-menu-item.is-danger:hover {
    background: rgba(220, 38, 38, 0.08);
}

/* ========================================================
   KNOWLEDGE
   ======================================================*/
#view-ai .ai-knowledge-panel {
    padding: 22px;
    border-radius: var(--radius-md);
}

#view-ai #knowledgeList {
    display: flex;
    flex-direction: column;
    margin-top: 18px;
}

#view-ai #knowledgeList .ai-knowledge-row {
    padding: 12px 4px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

#view-ai #knowledgeList .ai-knowledge-row:last-child {
    border-bottom: 0;
}

.ai-knowledge-hero-stats {
    margin-left: auto;

    display: flex;
    align-items: center;
    align-self: center;
}

.ai-knowledge-hero-stat {
    min-width: 150px;

    padding: 12px 14px;

    border-radius: var(--radius-md);

    background:
        linear-gradient(180deg,
            rgba(255, 255, 255, 0.96) 0%,
            rgba(248, 250, 252, 0.96) 100%);

    border: 1px solid rgba(148, 163, 184, 0.14);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        0 1px 2px rgba(15, 23, 42, 0.03);
}

.ai-knowledge-hero-stat-value {
    font-size: 28px;
    font-weight: 700;

    line-height: 1;

    margin-bottom: 8px;

    color: #0F172A;
}

.ai-knowledge-hero-stat-separator {
    padding: 0 2px;

    color: #94A3B8;
}

.ai-knowledge-hero-stat-label {
    display: flex;
    align-items: center;

    gap: 6px;

    font-size: 12px;
    color: #64748B;
}

.ai-knowledge-hero-stat-label .badge-dot {
    width: 8px;
    height: 8px;

    border-radius: 999px;
}

.ai-knowledge-hero-stat-label .badge-dot.is-knowledge {
    background: #6366F1;
}


/* =======================================================
   AI ASSISTANTS — HERO
======================================================= */

.ai-assistants-hero {
    background: rgba(59, 130, 246, 0.02);
}

.ai-assistants-hero-main {
    display: flex;
    align-items: center;

    gap: 24px;
}

.ai-assistants-hero-image {

    width: 72px;
    height: 72px;
    flex: 0 0 72px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-assistants-hero-image img {
    width: 64px;
    height: 64px;
    display: block;
}

.ai-assistants-hero-text {
    min-width: 240px;
}

.ai-assistants-hero-stats {
    margin-left: auto;

    display: flex;
    align-items: center;

    gap: 12px;
}

.ai-assistants-hero-stat {
    min-width: 92px;

    padding: 12px 14px;
    border-radius: var(--radius-md);

    background:
        linear-gradient(180deg,
            rgba(255, 255, 255, 0.96) 0%,
            rgba(248, 250, 252, 0.96) 100%);

    border: 1px solid rgba(148, 163, 184, 0.14);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        0 1px 2px rgba(15, 23, 42, 0.03);
}

.ai-assistants-hero-stat-value {
    font-size: 28px;
    font-weight: 700;

    line-height: 1;

    margin-bottom: 8px;

    color: #0F172A;
}

.ai-assistants-hero-stat-label {
    display: flex;
    align-items: center;

    gap: 6px;

    font-size: 12px;
    color: #64748B;
}

.ai-assistants-hero-stat-label .badge-dot {
    width: 8px;
    height: 8px;

    border-radius: 999px;
}

.ai-assistants-hero-stat-label .badge-dot.is-active {
    background: #22C55E;
}

.ai-assistants-hero-stat-label .badge-dot.is-online {
    background: #22C55E;
}


.ai-assistants-hero-stat-label .badge-dot.is-conflict {
    background: #EF4444;
}

.ai-assistants-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 24px;
}

/* HERO TYPOGRAPHY */

.ai-assistants-hero-text .sx-card-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;

    color: #0F172A;

    margin-bottom: 6px;
}

.ai-assistants-hero-text .setting-row-description {
    font-size: 14px;
    line-height: 1.6;

    color: #64748B;

    max-width: 340px;
}

/* AI CONTEXT CARDS — HOVER / ACTIVE */

#view-ai .sx-section>.sx-card[data-ai-context] {
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

#view-ai .sx-section>.sx-card[data-ai-context]:hover,
#view-ai .sx-section>.sx-card[data-ai-context].is-context-active {
    border-color: rgba(59, 130, 246, 0.45);
}

/* AI VIEW — REMOVE GLOBAL HEADER BORDER */

#view-ai .view-header {
    border-bottom: 0;
}


/* =======================================================
   AI KNOWLEDGE — HERO
======================================================= */

.ai-knowledge-hero {
    background: rgba(59, 130, 246, 0.02);
}

.ai-knowledge-hero-main {
    min-height: 100%;
    display: flex;
    align-items: flex-end;

    gap: 22px;
}

.ai-knowledge-hero-image {
    width: 147px;
    height: 120px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-knowledge-hero-image img {
    width: 147px;
    height: auto;

    display: block;
}

.ai-knowledge-hero-text {
    width: 360px;
    flex: 0 0 360px;
}

.ai-knowledge-hero-text .sx-card-title {
    font-size: 20px;
    font-weight: 700;

    letter-spacing: -0.02em;

    color: #0F172A;

    margin-bottom: 6px;
}

.ai-knowledge-hero-text .setting-row-description {
    font-size: 14px;
    line-height: 1.6;

    color: #64748B;

    max-width: 340px;
}

.ai-knowledge-hero-actions {
    margin-left: auto;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    align-self: flex-end;
}

/* =======================================================
   AI ROUTING — HERO
======================================================= */

.ai-routing-hero {
    padding-top: 18px;
    padding-bottom: 18px;
    background: rgba(59, 130, 246, 0.02);
}

.ai-routing-hero-layout {
    display: grid;
    grid-template-columns: 320px 1fr;

    align-items: center;

    gap: 32px;
}

.ai-routing-hero-visual {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: visible;
}

.ai-routing-hero-visual img {
    width: 270px;

    max-width: none;

    height: auto;

    display: block;

    transform: translateX(-18px);
}

.ai-routing-hero-content {
    min-width: 0;
}

.ai-routing-hero-title {
    font-size: 20px;
    font-weight: 700;

    letter-spacing: -0.02em;

    color: #0F172A;

    margin-bottom: 8px;
}

.ai-routing-hero-description {
    font-size: 14px;
    line-height: 1.6;

    color: #64748B;

    max-width: 620px;

    margin-bottom: 18px;
}

.ai-routing-hero-switch {
    max-width: 360px;
    margin-bottom: 18px;
}

.ai-routing-hero-info {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;

    gap: 18px;

    max-width: 620px;
}

.ai-routing-hero-info-divider {
    width: 1px;
    background: rgba(148, 163, 184, 0.18);
}

.ai-routing-hero-info-item {
    display: flex;
    align-items: flex-start;
}

.ai-routing-hero-info-title {
    font-size: 13px;
    font-weight: 700;

    color: #0F172A;

    margin-bottom: 4px;
}

.ai-routing-hero-info-description {
    font-size: 12px;
    line-height: 1.5;

    color: #64748B;
}

/* =======================================================
   AI ASSISTANT EDIT — ACTIVE CARD
======================================================= */

#assistantEditor .sx-card.is-context-active,
#aiKnowledgeEditMount .sx-card.is-context-active {

    border-color: #3b82f6;

    background: rgba(59, 130, 246, 0.02);

    box-shadow:
        0 0 0 1px rgba(59, 130, 246, 0.16);
}

/* =======================================================
   KNOWLEDGE EDIT — CONFIG BUILDER
======================================================= */

#aiKnowledgeEditMount #knowledgeConfigContainer {
    width: 100%;
}

#aiKnowledgeEditMount .faq-row {
    width: 100%;
    margin-top: 12px;
}

#aiKnowledgeEditMount .knowledge-builder-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr) minmax(0, 1fr) 40px;

    gap: 10px;

    align-items: start;

    width: 100%;
}

/* URL FIELD */

#aiKnowledgeEditMount .knowledge-builder-url {
    grid-column: 1 / 3;

    width: 100%;
    height: 37px;
}

/* FAQ TEXTAREAS */

#aiKnowledgeEditMount .knowledge-builder-input {
    min-height: 37px;

    overflow: hidden;
    resize: none;
}

/* GLOBAL WIDTH RESET */

#aiKnowledgeEditMount #knowledgeConfigContainer .sx-input,
#aiKnowledgeEditMount #knowledgeConfigContainer .sx-textarea {
    width: 100%;
    max-width: none;
}

/* REMOVE BUTTON */

#aiKnowledgeEditMount .knowledge-builder-grid .icon-btn {
    width: 37px;
    height: 37px;
    min-height: 37px;

    flex-shrink: 0;
}

/* ADD BUTTON */

#aiKnowledgeEditMount .faq-add {
    margin-top: 14px;
    margin-left: auto;

    display: flex;
}

#aiKnowledgeEditMount .knowledge-url-builder-grid {
    display: flex;
    align-items: center;
    gap: 10px;

    width: 100%;
}

#aiKnowledgeEditMount .knowledge-url-builder-grid .knowledge-builder-url {
    flex: 1;

    min-width: 0;
    width: auto;
    max-width: none;

    height: 37px;
    box-sizing: border-box;
}

#aiKnowledgeEditMount .knowledge-url-builder-grid .icon-btn {
    width: 37px;
    height: 37px;
    min-width: 37px;
    flex-shrink: 0;
}


/* ================= TABLET + MOBILE — AI CENTER HERO IMAGE ================= */

@media (max-width: 1023px) {

    .ai-center-hero .ai-center-hero-layout {
        grid-template-columns: 1fr;
    }

    .ai-center-hero .ai-center-hero-visual {
        display: none;
    }

}




/* ================= MOBILE — AI CENTER STATUS CARD ================= */

@media (max-width: 767px) {

    .ai-center-hero {
        padding: 16px;
    }

    .ai-center-hero .ai-center-hero-item {
        grid-template-columns: 38px 1fr;
        gap: 10px 12px;
        align-items: start;
    }

    .ai-center-hero .badge-ai-center {
        grid-column: 2;
        justify-self: stretch;
        width: 100%;
        min-width: 0;
    }

    .ai-center-hero .setting-row-description {
        max-width: none;
    }

    /* ================= MOBILE — AI CENTER ASSISTANTS CARD ================= */
    .ai-assistant-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;

        padding: 14px 0;
    }

    .ai-assistant-left {
        align-items: flex-start;
    }

    .ai-assistant-right {
        justify-content: stretch;
        width: 100%;
    }

    .ai-assistant-right .badge-ui {
        flex: 1 1 auto;
        min-width: 0;
    }

    .badge-assistant-usage {
        grid-template-columns: 1fr auto;
    }


    /* ======= AI ASSISTANTS — MOBILE LIST ===== */

    .ai-assistants-hero-image {
        display: none;
    }

    .ai-assistants-hero-main {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .ai-assistants-hero-stats {
        display: none;
    }

    .ai-assistants-panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    #addAssistantBtn {
        align-self: flex-start;
        min-width: 170px;
    }

    .ai-assistants-panel-header {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    #view-ai #assistantsList .ai-assistant-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px 0;
    }

    #view-ai #assistantsList .ai-assistant-right {
        width: 100%;
        justify-content: stretch;
        flex-wrap: wrap;
        gap: 10px;
    }

    #view-ai #assistantsList .ai-assistant-badges {
        flex: 1 1 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        justify-content: flex-start;
        align-items: center;
    }

    #view-ai #assistantsList .ai-assistant-badges .badge-ui {
        flex: 0 0 auto;
        min-width: fit-content;
    }

    #view-ai #assistantsList .ai-assistant-row {
        position: relative;
    }

    #view-ai #assistantsList .ai-assistant-right {
        display: grid;
        grid-template-columns: 1fr 37px;
        align-items: start;
        gap: 10px;
    }

    #view-ai #assistantsList .ai-assistant-badges {
        grid-column: 1;
    }

    #view-ai #assistantsList .ai-actions {
        grid-column: 2;
        justify-self: end;
        margin-left: 0;
    }

    /* ======= AI ASSISTANT EDIT — MOBILE STYLE TAB ======== */

    #assistantEditor [data-tab="style"] .sx-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    #assistantEditor [data-tab="style"] select.sx-input {
        width: 100%;
        height: 38px;
        min-height: 38px;
        flex: none;
    }

    #assistantEditor [data-tab="style"] input[type="range"] {
        width: 100%;
        max-width: 100%;
    }

    [data-tab="style"] #assistantVerbosity {
        width: 100%;
        flex: none;
        flex-basis: auto;
    }

    /* ======== AI KNOWLEDGE — MOBILE ======= */

    .ai-knowledge-hero {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .ai-knowledge-hero-image {
        display: none;
    }

    .ai-knowledge-hero-main {
        display: block;
        min-width: 0;
    }

    .ai-knowledge-hero-text {
        width: 100%;
        flex: none;
        min-width: 0;
    }

    .ai-knowledge-hero-stats {
        margin-left: 0;
        width: 100%;
    }

    .ai-knowledge-hero-stat {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .ai-knowledge-panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    #addKnowledgeBtn {
        align-self: flex-start;
        min-width: 160px;
    }

    #view-ai #knowledgeList .ai-knowledge-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px 0;
    }

    #view-ai #knowledgeList .ai-knowledge-left {
        align-items: flex-start;
    }

    #view-ai #knowledgeList .ai-knowledge-right {
        display: grid;
        grid-template-columns: 1fr 37px;
        align-items: start;
        gap: 10px;
        width: 100%;
    }

    #view-ai #knowledgeList .ai-knowledge-badges {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        justify-content: flex-start;
    }

    #view-ai #knowledgeList .ai-knowledge-badges .badge-ui {
        flex: 0 0 auto;
        min-width: fit-content;
    }

    #view-ai #knowledgeList .ai-actions {
        justify-self: end;
        margin-left: 0;
    }

    /* ======= AI ROUTING — MOBILE ======== */

    .ai-routing-hero-visual {
        display: none;
    }

    .ai-routing-hero-layout {
        grid-template-columns: 1fr;
    }

    .ai-routing-hero-content {
        min-width: 0;
    }

    .ai-routing-hero-switch {
        width: 100%;
    }

    .ai-routing-hero-switch .segmented {
        flex: 1;
    }

    #routingList .ai-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    #routingList .ai-left {
        align-items: flex-start;
    }

    #routingList .ai-right {
        width: 100%;
        justify-content: flex-start;
    }

    #routingList .badge-routing-priority {
        margin-left: 38px;
    }

}

/* ======== AI ASSISTANTS — TABLET 768–1023 ============ */

@media (min-width: 768px) and (max-width: 1023px) {

    .ai-assistants-hero-main {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .ai-assistants-hero-image {
        display: none;
    }

    .ai-assistants-hero-text {
        min-width: 0;
        width: 100%;
    }

    .ai-assistants-hero-stats {
        width: 100%;
        margin-left: 0;

        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .ai-assistants-hero-stat {
        min-width: 0;
    }

    /* ======   AI KNOWLEDGE — TABLET 768–1023 =========*/

    .ai-knowledge-hero-image {
        display: none;
    }

    .ai-knowledge-hero-main {
        flex: 1 1 auto;
        min-width: 0;
    }

    .ai-knowledge-hero-text {
        flex: 1 1 auto;
        min-width: 0;
    }

    /* =======  AI ASSISTANT EDIT — TABLET HOURS ======= */

    #assistantWorkingDaysContainer .working-day-row {
        grid-template-columns: 90px minmax(0, 1fr) 96px 38px;
        gap: 8px;
    }

    #assistantWorkingDaysContainer .extra-range {
        gap: 6px;
    }

    #assistantWorkingDaysContainer .time-input input {
        width: 72px;
    }

    #assistantWorkingDaysContainer .add-time-range {
        width: 96px;
        white-space: normal;
        line-height: 1.15;
        text-align: center;
    }

    /* ===== ROUTING ====== */

    .ai-routing-hero-visual {
        display: none;
    }

    .ai-routing-hero-layout {
        grid-template-columns: 1fr;
    }

    .ai-routing-hero-content {
        min-width: 0;
    }

}




/* ========= AI ASSISTANTS — LAPTOP / COMPACT 1024–1599 ========= */

@media (min-width: 1024px) and (max-width: 1599px) {

    .ai-assistants-hero-main {
        flex-wrap: wrap;
        gap: 18px;
    }

    .ai-assistants-hero-text {
        flex: 1 1 220px;
        min-width: 0;
    }

    .ai-assistants-hero-stats {
        width: 100%;
        margin-left: 0;

        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }

    .ai-assistants-hero-stat {
        min-width: 0;
    }

    /* ======= AI KNOWLEDGE — LAPTOP / COMPACT 1024–1599 =====*/

    .ai-knowledge-hero-image {
        display: none;
    }

    .ai-knowledge-hero-main {
        flex: 1 1 auto;
        min-width: 0;
    }

    .ai-knowledge-hero-text {
        width: auto;
        flex: 1 1 auto;
        min-width: 0;
    }

}




/* ===========  AI ASSISTANTS — LARGE DESKTOP (1600+) ============== */

@media (min-width: 1600px) {

    .ai-assistants-hero-main {
        flex-wrap: wrap;
        gap: 20px;
    }

    .ai-assistants-hero-text {
        flex: 1 1 220px;
        min-width: 0;
    }

    .ai-assistants-hero-stats {
        margin-left: auto;

        display: flex;
        flex-wrap: wrap;

        justify-content: flex-end;

        gap: 12px;
    }

    /* ======= AI ASSISTANT EDIT — HOURS ROW FIX =========== */

    #assistantWorkingDaysContainer .working-day-row {
        display: grid;
        grid-template-columns: 120px minmax(0, 1fr) 120px 44px;
        align-items: center;
        gap: 12px;
    }

    #assistantWorkingDaysContainer .day-ranges {
        min-width: 0;
    }

    #assistantWorkingDaysContainer .extra-range {
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
    }

    #assistantWorkingDaysContainer .time-input input {
        width: 78px;
    }

    #assistantWorkingDaysContainer .add-time-range {
        justify-self: end;
        white-space: nowrap;
    }


    /* ======= AI KNOWLEDGE — LARGE DESKTOP 1600+ ===== */

    .ai-knowledge-hero {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 20px;
    }

    .ai-knowledge-hero-main {
        flex: 1 1 360px;
        min-width: 0;
    }

    .ai-knowledge-hero-text {
        min-width: 0;
        flex: 1 1 auto;
    }

    .ai-knowledge-hero-stats {
        margin-left: auto;
        flex: 0 0 auto;
    }

    .ai-knowledge-hero-stat {
        min-width: 120px;
    }

    /* ======= AI ROUTING — LARGE DESKTOP 1600+ ======*/

    .ai-routing-hero-layout {
        grid-template-columns: 170px minmax(0, 1fr);
        gap: 18px;
    }

    .ai-routing-hero-visual {
        display: flex;
        align-items: center;
        justify-content: center;

        overflow: visible;
    }

    .ai-routing-hero-visual img {
        width: 175px;
        max-width: none;

        margin-left: 6px;
    }

    .ai-routing-hero-content {
        min-width: 0;
    }

    .ai-routing-hero-info {
        max-width: none;
    }




}