.layout-settings {
    display: flex;
}

.layout-settings .settings-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;


}



/* ==================================
   GLOBAL SETTINGS TABS
================================== */
.settings-tabs {
    display: flex;
    gap: var(--space-sm);

    position: sticky;
    top: 40px;
    /* wysokość .view-header */
    background: var(--surface-main);
    z-index: 3;
}

.settings-tab {
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}


/* HOVER tylko dla nieaktywnych */
.settings-tab:not(.active):hover {
    background: var(--state-hover-bg);
    border-color: var(--state-hover-border);
}

/* ACTIVE — spójne z .nav-item.active */
.settings-tab.active {
    background: var(--tab-active-bg);
    color: var(--tab-active-color);
    border: 1px solid var(--tab-active-border);
    font-weight: 600;
}

.settings-tabs .settings-tab {
    min-width: 140px;
    text-align: center;
    border-radius: var(--radius-sm);
}




/* ===== SWITCH ===== */
.routing-switch {
    display: inline-flex;
    border: 1px solid var(--surface-soft-border);
    background: var(--surface-soft-bg);
    border-radius: 14px;
    padding: 2px;
    gap: 6px;
}

.routing-option {
    flex: 0 0 auto;
    /* szerokość przycisku */
    height: 25px;
    min-width: 130px;
    padding: 0 14px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: 0.18s ease;
}

.routing-option svg {
    width: 22px;
    height: 22px;
    margin-right: 8px;
    flex-shrink: 0;
}

/* SVG dla widget section                                         */
#widgetPositionSwitch .routing-option svg {
    width: 18px;
    height: 18px;
    margin-right: 0;
}

#widgetPositionSwitch .routing-option[data-position="right"] svg {
    margin-left: 0;
}

/* --------------------------------------------------------------*/






.routing-option.active {
    background: linear-gradient(135deg, #1565C0, #2D7BE5);
    color: white;
}

.routing-icon {
    font-size: 18px;
}


.switch {
    position: relative;
    width: 36px;
    height: 20px;
}

.switch input {
    display: none;
}


.switch input:checked+.slider {
    background: #22c55e;
}

.switch input:checked+.slider::before {
    transform: translateX(16px);
}

.switch input {
    width: 38px;
    height: 20px;
}

.slider {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 999px;
}

.slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 2px;
    left: 2px;
    background: white;
    border-radius: 50%;
    transition: .2s;
}



/* ===== TIMEOUT ===== */

.timeout-row {
    margin-top: 18px;
    padding: 4px 18px;
    background: var(--surface-soft-bg);
    border: 1px solid var(--surface-soft-border);
    border-radius: 14px;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timeout-label {
    font-size: 13px;
    font-weight: 500;
}

.timeout-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.timeout-control input {
    width: 60px;
    height: 26px;
    text-align: center;
    font-size: 13px;
    border-radius: 8px;
    border: 1px solid var(--input-border);
}

.timeout-btn {
    width: 34px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid var(--surface-soft-border);
    background: white;
    font-size: 18px;
    cursor: pointer;
}

.timeout-btn:hover {
    background: #f3f4f6;
}

.timeout-unit {
    font-size: 13px;
    color: var(--text-secondary);
}


/* SETTINGS/SHORTCUT COMPONENTS */
.shortcuts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 12px;
}

.shortcuts-header h2 {
    margin: 0;
}

.shortcuts-header .btn-primary {
    margin-left: auto;
    /*margin-top: 10px;*/
}

.shortcuts-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    /* większy dystans między kolumnami */
    margin-top: 24px;
}

.shortcuts-column {
    display: flex;
    flex-direction: column;
}

.shortcuts-column h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1e293b;
}

/* MORE SHORTCUTS POPUP */
.shortcuts-popup {
    position: absolute;
    bottom: 60px;
    /* nad footerem */
    left: 12px;
    min-width: 180px;
    max-width: 260px;
    background: var(--chat-bg-system);
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 50;
}

.shortcuts-popup.hidden {
    display: none;
}

.shortcuts-popup button {
    all: unset;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shortcuts-popup button:hover {
    background: #f3f4f6;
}

@media (max-width: 1100px) {
    .shortcuts-list {
        grid-template-columns: 1fr;
    }
}

.shortcuts-preview-ui {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px dashed var(--surface-soft-border);
    background: var(--bg-panel);
}

.profile-wrapper {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
}

.profile-wrapper h2 {
    margin-bottom: 20px;
    text-align: center;
}

.profile-avatar {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 16px 0 24px 0;
}

.profile-avatar img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-avatar-edit {
    margin-top: 8px;
}

.profile-avatar-edit a {
    font-size: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: 0.15s ease;
}

.profile-avatar-edit a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.profile-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-form label {
    font-size: 13px;
    font-weight: 600;
    margin-top: 6px;
}

.profile-form input,
.profile-form select,
.profile-form textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 13px;
}

.profile-form textarea {
    min-height: 120px;
    resize: vertical;
}

.profile-save {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

/* SETTINGS ROW CARD (1A style) */
.setting-row-card {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 14px 18px;

    border: 1px solid var(--surface-soft-border);
    border-radius: var(--radius-md);
    background: var(--card-bg);
}

.setting-row-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.setting-row-description {
    font-size: 12px;
    color: var(--text-secondary);
}


.settings-actions {
    margin-top: 18px;
}

/* SETTINGS SAVE TOAST */

.settings-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;

    background: #1f2937;
    color: white;

    padding: 10px 14px;

    border-radius: var(--radius-sm);

    font-size: 13px;

    opacity: 0;
    transform: translateY(10px);

    transition: all 0.25s ease;

    pointer-events: none;
}

.settings-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.hidden {
    display: none;
}

/* ===== SYSTEM LAYOUT ===== */
.system-view {
    display: none;
}

.system-view.active {
    display: block;
}

.system-layout {
    display: flex;
    flex-direction: column;
}

/* odstęp między kartami (3x) */
.system-layout>*+* {
    margin-top: var(--settings-section-top-default);
}

/* większy odstęp między grupami (2x sekcja) */
.system-layout>.setting-row-group-start {
    margin-top: var(--settings-section-gap);
}



/*----------------------------------------------------*/

/* =====================================================
   SX SETTINGS SYSTEM (STERILE LAYOUT ENGINE)
   ===================================================== */

.sx-settings {
    max-width: 920px;
    margin: 0 auto;
}


/* ---------- TABS ---------- */

.sx-tabs {
    display: flex;

    gap: 8px;

    margin-top: 18px;
    margin-bottom: 20px;

    max-width: 630px;
}


/* ---------- SECTION ---------- */

.sx-section {
    display: flex;
    flex-direction: column;
    gap: 12px;

    margin-bottom: 28px;
}


/* ---------- CARD ---------- */

.sx-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    padding: 14px 18px;

    border: 1px solid var(--surface-soft-border);
    border-radius: var(--radius-md);

    background: var(--card-bg);
}


/* ---------- LARGE CARD ---------- */

.sx-card-large {
    padding: 16px 18px;

    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);

    background: var(--card-bg);
}


/* ---------- CARD INFO ---------- */

.sx-card .setting-row-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}


/* ---------- TEXTAREA ---------- */

.sx-card-large textarea {
    width: 100%;
    height: 80px;

    margin-top: 10px;

    box-sizing: border-box;

    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);

    padding: 10px 12px;

    font-size: 13px;

    resize: vertical;
}

/* ---------- SETTINGS TABS (SX) ---------- */

.sx-tabs .settings-tab {
    min-width: 140px;

    height: 34px;

    padding: 0 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: var(--radius-sm);

    font-size: 13px;

    flex: 1;
}

/* ---------- CARD TITLE ---------- */

.sx-card-title {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-primary);
}

.sx-card-panel-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ---------- CARD WITH TEXTAREA ---------- */

.sx-card-textarea {
    align-items: flex-start;
    gap: 24px;
}

/* poziom między title (500) a description */
.sx-card-subtitle {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-primary);
}

/* ---------- CARD ERROR WARNING ---------- */

.sx-card-error {
    border-color: var(--danger);
    background: var(--danger-soft);
}

.hidden-error {
    visibility: hidden;
}


/* ---------- TEXTAREA RIGHT SIDE ---------- */

.sx-textarea {

    width: 340px;
    min-height: 90px;
    box-sizing: border-box;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 13px;
    resize: vertical;
    max-width: 380px;
}

.sx-textarea textarea {
    width: 100%;
    min-height: 70px;
    border: none;
    background: transparent;
    resize: vertical;
    padding: 0;
}

.sx-textarea-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ---------- USUWANIE GRUBEGO BORDERA INPUT ---------- */
/* ---------- GLOBAL INPUT / TEXTAREA / SELECT FOCUS ---------- */

.sx-input:focus,
.sx-input:focus-visible,

.sx-textarea:focus,
.sx-textarea:focus-visible,

.sx-select:focus,
.sx-select:focus-visible {

    outline: none;
    box-shadow: none;
    border-color: #3b82f6;
}


/* ---------- WRAPPER FOCUS ---------- */

.sx-input-wrap:focus-within,
.sx-textarea-wrap:focus-within,
.sx-select-wrap:focus-within,

.sx-card-input:focus-within,
.sx-card-textarea:focus-within,
.sx-card-select:focus-within {

    border-color: #3b82f6;
}



.shortcut-label-input:focus,
.shortcut-label-input:focus-visible,
.shortcut-text:focus,
.shortcut-text:focus-visible {
    outline: none;
    box-shadow: none;
    border-color: #3b82f6;
}

.shortcut-label-box:focus-within {
    border-color: #3b82f6;
}

/* ---------- HEADER INPUT ACTIVE CARD ---------- */

.widget-header-field:focus-within .setting-row-description {
    color: #3b82f6;
}

.widget-header-field:focus-within .sx-input {
    border-color: #3b82f6;
}


/* ======================================================
   SETTINGS INPUT TYPOGRAPHY 
   ====================================================== */

.sx-input input,
.sx-textarea,
.sx-select,
.sx-input textarea,
.sx-input select {

    font-size: 12px;
    line-height: 1.5;
    color: #111827;
    font-weight: 500;
}

/* ---------- SETTINGS TITLE INPUT ---------- */

.sx-input.is-title input,
.sx-textarea.is-title textarea {

    font-size: 12px;
    font-weight: 500;
}




/* ---------- CARD WITH STACK CONTROLS ---------- */

.sx-card-stack {
    align-items: flex-start;
    gap: 24px;
}


/* prawa kolumna */

.sx-stack-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* pojedynczy wiersz */

.sx-control {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 200px;

    font-size: 13px;
}

/* karta z wieloma wierszami */
.sx-card-vertical {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
}

/* pojedynczy wiersz */
.sx-row {
    display: flex;
    justify-content: space-between;
    align-items: center;

    flex-wrap: wrap;
    gap: 16px;

}

.sx-input input:disabled {
    background: var(--bg-disabled, #f3f4f6);
    color: #6b7280;
    cursor: not-allowed;
}

/* ================================*/
/* account card */
/* ================================*/
.account-view {
    display: none;
}

.account-view.active {
    display: block;
}

/*
.account-scroll {
    height: calc(100vh - 210px);
    overflow-y: auto;
    scrollbar-gutter: stable;
} */

.account-scroll {
    height: calc(100vh - 210px);
    overflow-y: auto;

    -ms-overflow-style: none;
    scrollbar-width: none;
}

.account-scroll::-webkit-scrollbar {
    display: none;
}


/* ================================*/
/* integrations card */
/* ================================*/
.integrations-view {
    display: none;
}

.integrations-view.active {
    display: block;
}






/* SELECT CONTAINER */

.sx-select {
    min-width: 260px;
    border: 1px solid var(--surface-soft-border);
    border-radius: var(--radius-sm);
    height: 34px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    background: #fff;
}


/* SELECT */

.sx-select select {
    border: none;
    background: transparent;
    font-size: 13px;
    outline: none;
    width: 100%;
}

.sx-input {
    min-width: 260px;
    border: 1px solid var(--surface-soft-border);
    border-radius: var(--radius-sm);
    height: 34px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    background: #fff;

}


.sx-input input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 13px;
}

/* ==================================
   UI TABS (WYGLĄD JAK STARE SETTINGS + SCROLL)
================================== */

.ui-tabs {
    display: flex;
    gap: var(--space-sm);
    margin-top: 18px;
    margin-bottom: 20px;

    /* 🔥 scroll zamiast łamania */
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;

    /* 🔥 usunięcie ograniczenia szerokości */
    max-width: 100%;

    /* 🔥 UX */
    padding-right: 10px;
    padding-bottom: 4px;
}

/* 🔥 scrollbar (lekki, SaaS style) */
.ui-tabs::-webkit-scrollbar {
    height: 6px;
}

.ui-tabs::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.ui-tab {
    background: transparent;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    height: 34px;
    padding: 0 16px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;

    min-width: 140px;

    /* 🔥 kluczowe dla scrolla */
    flex: 0 0 auto;
}

/* hover jak wcześniej */

.ui-tab:not(.active):hover {
    background: var(--state-hover-bg);
    border-color: var(--state-hover-border);
}

/* active jak wcześniej */

.ui-tab.active {
    background: var(--tab-active-bg);
    color: var(--tab-active-color);
    border: 1px solid var(--tab-active-border);
    font-weight: 600;
}

.ui-tabs-empty {
    margin-top: 0;
    margin-bottom: 20px;
    height: 0;
}



/* ===== WORKING HOURS ROW ===== */

.working-day-row {
    display: grid;
    grid-template-columns: 160px 1fr auto auto;
    align-items: baseline;
    gap: 16px;
    min-height: 37px;
    flex: 1;
}

.working-day-row .switch {
    justify-self: end;
}

/* nazwa dnia */

.day-name {
    font-size: 13px;
    font-weight: 500;
}


/* godziny */
.day-hours {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.main-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.extra-ranges {
    margin-left: 176px;
    margin-top: 12px;

    display: flex;
    flex-direction: column;
    gap: 12px;

    width: fit-content;
}

.extra-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remove-range {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 13px;
}

.day-ranges {
    min-height: 37px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* pola czasu */

.time-input {
    border: 1px solid var(--surface-soft-border);
    border-radius: var(--radius-sm);
    height: 34px;
    padding: 0 8px;
    display: flex;
    align-items: center;
}

.time-input input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    width: 70px;
}


/* separator */

.time-separator {
    color: var(--text-secondary);
}


/* add range */

.add-time-range {
    background: transparent;
    border: none;
    font-size: 13px;
    color: var(--color-blue-600);
    cursor: pointer;
}

.add-time-range:hover {
    text-decoration: underline;
}

.day-offline {
    display: none;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 34px;
}

.day-disabled .time-input,
.day-disabled .time-separator,
.day-disabled .extra-ranges {
    display: none;
}

.day-disabled .day-offline {
    display: block;
}

.day-disabled .add-time-range {
    opacity: 0.35;
    pointer-events: none;
}

.day-disabled .remove-range {
    display: none;
}

.hours-disabled .sx-card {
    opacity: 0.4;
    pointer-events: none;
}



.day-disabled .extra-range {
    display: none;
}

#workingDaysContainer {
    margin-bottom: 0;
}


/* =====================================================
   SX SETTINGS — SHORTCUTS
   ===================================================== */
#shortcutsPreviewContainer {
    display: flex;
    gap: 8px;
}


#addShortcutBtn {
    padding: 7px 10px;
    min-width: 100px;
}


.shortcut-top {
    display: flex;
    align-items: center;
}

.shortcut-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shortcut-label-box {
    min-width: 200px;
}

.shortcut-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.shortcut-toggle-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.shortcut-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shortcut-menu {
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
}

.shortcut-menu:hover {
    background: var(--state-hover-bg);
}

.shortcut-menu-wrapper {
    position: relative;
}

.shortcut-menu-popup {
    position: absolute;
    right: 0;
    top: 28px;

    background: white;
    border: 1px solid var(--surface-soft-border);
    border-radius: 8px;

    padding: 6px;

    display: none;

    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.shortcut-menu-popup button {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--danger);
    font-size: 13px;
    padding: 6px 10px;
}

.shortcut-drag {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 37px;

    font-size: 16px;

    margin-right: 4px;

    border-radius: 6px;

    cursor: grab;

    opacity: 0.7;

    transition:
        background 0.15s ease,
        opacity 0.15s ease;
}

.shortcut-drag:hover {
    background: var(--state-hover-bg);
    opacity: 1;
}

.shortcuts-scroll {
    max-height: calc(100vh - 380px);
    overflow-y: auto;
}

#shortcutsList {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shortcut-item:not(.sx-card) {

    display: flex;
    flex-direction: column;
    gap: 10px;

    background: var(--surface-soft-bg);
    border: 1px solid var(--surface-soft-border);
    border-radius: var(--radius-md);

    padding: 12px;

    transition: border 0.2s ease, box-shadow 0.2s ease, transform 0.18s ease;

    cursor: grab;
}

.shortcut-item:hover {
    border-color: rgba(59, 130, 246, 0.45);
}



.shortcut-label {
    font-size: 13px;
    font-weight: 600;
}

.shortcut-label-input {

    flex: 1;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--input-text);
}

.shortcut-text {

    width: 100%;
    box-sizing: border-box;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    resize: none;
    min-height: 60px;
    font-family: var(--font-main);
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--input-text);
}

/* DRAG */

.shortcut-item.drop-target {
    box-shadow:
        0 6px 18px rgba(21, 101, 192, 0.08),
        0 0 0 2px #10b981 inset;
}

.shortcut-item.drop-animate {
    animation: shortcutSnap 0.18s ease;
}

@keyframes shortcutSnap {

    0% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }

}


#appSaveStatus {
    margin-left: auto;
    pointer-events: none;
}

/* =====================================================
   SX SETTINGS — PROFILE + AI ASSISTENT
   ===================================================== */

.sx-row-space {
    justify-content: space-between;
}

.sx-row-end {
    justify-content: flex-end;
}

.sx-row-master {
    padding-bottom: 18px;
    margin-bottom: 8px;

    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}


.profile-avatar-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    cursor: pointer;
}

.profile-avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-avatar-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.45);
    color: white;
    font-size: 18px;

    border-radius: 50%;

    opacity: 0;
    transition: opacity .15s ease;
}

.profile-avatar-wrapper:hover .profile-avatar-overlay {
    opacity: 1;
}

/* =====================================================
   WIDGET SETTINGS — CONTEXT PREVIEW
   ===================================================== */
.widget-settings-preview-context {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.widget-preview-box {
    margin-top: 8px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.widget-preview-avatar {
    width: 44px;
    height: 44px;

    border-radius: 50%;
    background: #cbd5f5;

    flex-shrink: 0;
}

.widget-preview-title {
    font-size: 15px;
    font-weight: 600;
}

.widget-preview-status {
    margin-top: 2px;
    font-size: 12px;
    opacity: 0.85;
}

.widget-preview-header-top {
    display: flex;
    justify-content: flex-end;
}

.widget-preview-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-preview-header-actions button {
    width: 30px;
    height: 30px;

    border: 0;
    border-radius: 10px;

    background: rgba(255, 255, 255, 0.12);
    color: #fff;

    cursor: default;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;
}

.widget-preview-header-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.widget-preview-avatar {
    width: 56px;
    height: 56px;

    border-radius: 50%;
    background: #c7d0f0;

    flex-shrink: 0;
}

.widget-preview-header-content {
    min-width: 0;
}

.widget-preview-title {
    font-size: 15px;
    font-weight: 700;
}

.widget-preview-status-row {
    margin-top: 4px;

    display: flex;
    align-items: center;
    gap: 7px;
}

.widget-preview-status-dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;
    background: #22c55e;

    flex-shrink: 0;
}

.widget-preview-status-text {
    font-size: 12px;
    opacity: 0.92;
}

.widget-preview-body {
    flex: 1;

    padding: 14px;

    display: flex;
    flex-direction: column;
    gap: 14px;

    background: #fff;
}

.widget-text-color-preset.active {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}


.widget-preview-input {
    flex: 1;

    height: 42px;

    border-radius: 999px;
    background: #f3f4f7;

    display: flex;
    align-items: center;

    padding: 0 14px;

    font-size: 13px;
    color: #9ca3af;
}

/* Compact height only for Widget Settings preview */
.settings-widget-preview-body {
    flex: 0 0 auto;
    min-height: 300px;
    max-height: 300px;

    overflow: hidden;
}

/* =====================================================
   WIDGET SETTINGS — ISOLATED PREVIEW
   ===================================================== */

.widget-settings-preview-stage {
    position: relative;

    width: 100%;
    /*height: 580px;*/

    display: flex;
    justify-content: center;
    align-items: flex-start;

    overflow: hidden;
}

.settings-widget-preview-window {
    width: 380px;
    height: auto;
    min-height: 0;

    margin-top: 10px;

    background: #fff;
    border-radius: 14px;
    overflow: hidden;

    display: flex;
    flex-direction: column;

    border: 1px solid rgba(59, 130, 246, 0.14);

    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04);
}

.settings-widget-preview-body {
    flex: 0 0 auto;
    height: 260px;
    overflow: hidden;
}

.settings-widget-preview-header {
    position: relative;

    padding: 20px 14px 14px;

    background: linear-gradient(135deg, #516274 0%, #344256 100%);
    color: #fff;
}

.settings-widget-preview-header-actions {
    position: absolute;
    top: 10px;
    right: 10px;

    display: flex;
    gap: 6px;
}

.settings-widget-preview-header-actions button {
    width: 28px;
    height: 28px;

    border: none;
    border-radius: 8px;

    background: rgba(255, 255, 255, 0.15);
    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;
    cursor: default;
}

.settings-widget-preview-header-main {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-top: 28px;
    min-height: 55px;
}

.settings-widget-preview-avatar {
    width: 55px;
    height: 55px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    border-radius: 0;
    overflow: visible;
}

.settings-widget-preview-avatar-img {
    width: 55px;
    height: 55px;

    display: block;

    object-fit: contain;
}

.settings-widget-preview-avatar.is-circle {
    border-radius: 50%;
    overflow: hidden;
}

.settings-widget-preview-avatar.is-circle .settings-widget-preview-avatar-img {
    object-fit: cover;
    object-position: center 42%;
}

.settings-widget-preview-header-text {
    display: flex;
    flex-direction: column;
}

.settings-widget-preview-title {
    font-size: 18px;
    font-weight: 600;
}

.settings-widget-preview-status {
    margin-top: 2px;

    display: flex;
    align-items: center;
    gap: 4px;

    font-size: 12px;
    opacity: 0.85;
}

.settings-widget-preview-status-dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;
    background: #22c55e;

    flex-shrink: 0;
}

.settings-widget-preview-body {
    flex: 1;

    padding: 16px 14px 20px;

    display: flex;
    flex-direction: column;
    gap: 16px;

    background: #fff;
}

.settings-widget-preview-message-row {
    display: flex;
}

.settings-widget-preview-message-row-visitor {
    justify-content: flex-end;
}

.settings-widget-preview-message-row-operator {
    justify-content: flex-start;
}

.settings-widget-preview-message {
    max-width: 72%;

    padding: 10px 14px;

    border-radius: 16px;

    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
}

.settings-widget-preview-message-visitor {
    background: linear-gradient(135deg, #3F4E5F 0%, #2D3948 100%);
    color: #fff;

    border-bottom-right-radius: 6px;

    font-weight: 350;
}

.settings-widget-preview-message-operator {
    background: #f1f3f7;
    color: #111;

    border-bottom-left-radius: 6px;
}

.settings-widget-preview-input-area {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 10px;

    background: #fff;
}

.settings-widget-preview-input {
    flex: 1;

    min-height: 38px;

    padding: 0 12px;

    display: flex;
    align-items: center;

    border-radius: 16px;
    background: #f1f3f7;

    font-size: 14px;
    color: #9ca3af;
}

.settings-widget-preview-send {
    width: 38px;
    height: 38px;

    border-radius: 50%;
    border: none;

    background: #2D3948;
    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: default;
}

.settings-widget-preview-footer {
    padding: 6px;

    text-align: center;

    font-size: 11px;
    color: #aaa;
}

/* =====================================================
   WIDGET SETTINGS — LOCAL TABS VIEWS
   ===================================================== */

.widget-view {
    display: none;
}

.widget-view.active {
    display: block;
}



/* =====================================================
   WIDGET SETTINGS — switch lunch possition bubble
   ===================================================== */
.widget-position-icon {
    flex-shrink: 0;
}

.routing-option[data-position="left"] {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding-left: 14px;
}

.routing-option[data-position="right"] {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding-right: 14px;
}

.routing-option[data-position="left"] .widget-position-icon {
    margin-right: 2px;
}

.routing-option[data-position="right"] .widget-position-icon {
    margin-left: 2px;
}


/* =====================================================
   WIDGET SETTINGS — avatar
   ===================================================== */

.widget-avatar-group {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.widget-avatar-item {
    position: relative;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.widget-avatar-image {
    position: relative;

    width: 52px;
    height: 52px;

    border-radius: 50%;
    overflow: hidden;

    border: 1px solid #e2e8f0;

    background: #f8fafc;
    flex-shrink: 0;
}

.widget-avatar-item.active .widget-avatar-image {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.widget-avatar-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


.widget-avatar-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}


/* =====================================================
   WIDGET SETTINGS — avatar modal
   ===================================================== */

.widget-avatar-crop-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
}

.widget-avatar-crop-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
}

.widget-avatar-crop-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 360px;
    max-width: calc(100vw - 32px);

    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;

    padding: 18px;

    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.widget-avatar-crop-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.widget-avatar-crop-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.widget-avatar-crop-description {
    margin-top: 3px;
    font-size: 12px;
    color: #64748b;
}

.widget-avatar-crop-close {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    color: #64748b;
}

.widget-avatar-crop-preview {
    width: 180px;
    height: 180px;

    margin: 0 auto 18px;

    border-radius: 50%;
    overflow: hidden;

    background: #f1f5f9;
    border: 1px solid #e2e8f0;

    cursor: grab;
}

.widget-avatar-crop-preview:active {
    cursor: grabbing;
}

.widget-avatar-crop-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;

    transform-origin: center center;
    user-select: none;
    pointer-events: none;
}

.widget-avatar-crop-control {
    margin-bottom: 18px;
}

.widget-avatar-crop-control label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: #475569;
    font-weight: 600;
}

.widget-avatar-crop-control input[type="range"] {
    width: 100%;
}

.widget-avatar-crop-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.widget-avatar-crop-actions button {
    height: 34px;

    padding: 0 14px;

    border-radius: var(--radius-sm);
    border: 1px solid var(--surface-soft-border);

    background: #ffffff;
    color: var(--text-primary);

    font-size: 13px;
    font-weight: 500;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        transform 0.12s ease;
}

.widget-avatar-crop-actions button:hover {
    background: var(--state-hover-bg);
    border-color: var(--state-hover-border);
}

.widget-avatar-crop-actions button:active {
    transform: translateY(1px);
}

.widget-avatar-crop-apply {
    background: var(--tab-active-bg) !important;
    color: var(--tab-active-color) !important;
    border-color: var(--tab-active-border) !important;
}

.widget-avatar-edit-badge {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(15, 23, 42, 0.42);

    color: #ffffff;

    font-size: 18px;
    font-weight: 600;

    opacity: 0;

    transition: opacity 0.18s ease;

    pointer-events: none;
}

.widget-avatar-image:hover .widget-avatar-edit-badge {
    opacity: 1;
}

.widget-avatar-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;

    min-width: 120px;

    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;

    padding: 6px;

    display: none;
    flex-direction: column;
    gap: 4px;

    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);

    z-index: 50;
}

.widget-avatar-menu.active {
    display: flex;
}

.widget-avatar-menu-action {
    border: none;
    background: transparent;

    height: 34px;

    border-radius: 8px;

    padding: 0 10px;

    text-align: left;

    font-size: 13px;
    font-weight: 500;

    color: #334155;

    cursor: pointer;

    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.widget-avatar-menu-action:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* =====================================================
   UI RADIO GLOBAL SETTINGS
   ===================================================== */

.ui-radio {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    font-size: 12px;
    font-weight: 500;

    color: var(--text-secondary);

    cursor: pointer;
    user-select: none;

    flex-shrink: 0;
}

.ui-radio input {
    display: none;
}

.ui-radio-dot {
    width: 16px;
    height: 16px;

    border-radius: 50%;

    border: 1px solid var(--surface-soft-border);
    background: #fff;

    box-sizing: border-box;

    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        box-shadow 0.15s ease;
}

.ui-radio input:checked+.ui-radio-dot {
    background: #22c55e;
    border-color: #22c55e;

    box-shadow:
        inset 0 0 0 3px #fff;
}

/* =====================================================
   WIDGET HEADER SETTINGS
   ===================================================== */

.widget-header-card {
    gap: 20px;
}

.widget-header-fields {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.widget-header-field {
    display: grid;
    grid-template-columns: 170px 1fr;

    align-items: center;
    gap: 16px;
}

.widget-header-label {
    font-size: 13px;
    line-height: 1.2;
    font-weight: 600;

    color: var(--text-primary);
}

.widget-header-input {
    display: flex;
}

.widget-header-title-input {
    justify-content: flex-end;
}

.widget-header-title-input {
    width: 350px;
    margin-left: auto;
}

.widget-header-title-input input {
    width: 100%;
    text-align: left;
    font-size: 12px;
    line-height: 1.5;
    color: #111827;
    font-weight: 600;
}

.widget-status-control .widget-header-input {
    flex: 1;
}

.widget-status-control .widget-header-input input {
    width: 100%;
    font-size: 12px;
    line-height: 1.5;
    color: #111827;
    font-weight: 500;
}

.widget-status-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =====================================================
   STATUS DOT PICKER
   ===================================================== */

.widget-status-dot-picker {
    position: relative;

    width: 74px;
    flex-shrink: 0;
}

.widget-status-dot-trigger {
    width: 100%;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 10px;

    border: 1px solid var(--surface-soft-border);
    border-radius: 8px;

    background: #fff;

    cursor: pointer;
}

.widget-status-dot-arrow {
    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--text-secondary);

    line-height: 1;

    pointer-events: none;
}

.widget-status-dot-arrow svg {
    width: 14px;
    height: 14px;
}

.widget-status-dot-preview {
    width: 10px;
    height: 10px;

    border-radius: 50%;

    display: inline-block;
}

.widget-status-dot-preview.is-green {
    background: #22c55e;
}

.widget-status-dot-preview.is-red {
    background: #ef4444;
}

.widget-status-dot-preview.is-none {
    position: relative;

    background: #fff;
    border: 1px solid #cbd5e1;
}

.widget-status-dot-preview.is-none::after {
    content: '';

    position: absolute;

    top: 50%;
    left: 50%;

    width: 12px;
    height: 1.5px;

    background: #94a3b8;

    transform:
        translate(-50%, -50%) rotate(-45deg);
}

.widget-status-dot-menu {
    position: absolute;

    top: calc(100% + 6px);
    left: 0;

    width: 100%;

    padding: 6px;

    display: none;
    flex-direction: column;
    gap: 4px;

    border: 1px solid var(--surface-soft-border);
    border-radius: 10px;

    background: #fff;

    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.08);

    z-index: 30;
}

.widget-status-dot-picker.active .widget-status-dot-menu {
    display: flex;
}

.widget-status-dot-menu button {
    width: 100%;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 8px;

    background: transparent;

    cursor: pointer;
}

.widget-status-dot-menu button:hover {
    background: #f8fafc;
}

/* =====================================================
   WIDGET SETTINGS — LAUNCHER ICONS
   ===================================================== */

.widget-launcher-icons {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.widget-launcher-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-launcher-icon-option {
    width: 42px;
    height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--surface-soft-border);
    border-radius: 50%;

    background: #ffffff;
    color: #0f172a;

    cursor: pointer;
}

.widget-launcher-icon-option.active {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.widget-launcher-icon-option svg {
    width: 20px;
    height: 20px;
}

.widget-launcher-eyes-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.widget-launcher-eyes-preview span {
    width: 7px;
    height: 7px;

    border-radius: 50%;
    background: currentColor;
}

/* eyes → wink */
.widget-launcher-icon-option[data-launcher-icon="eyes"] .widget-launcher-eyes-preview span {
    animation-name: widgetLauncherPreviewBlink;
    animation-duration: 4.5s;
    animation-iteration-count: infinite;
}

/* wink  */
.widget-launcher-icon-option[data-launcher-icon="wink"] .widget-launcher-eyes-preview span {
    animation-name: none;
}

.widget-launcher-icon-option[data-launcher-icon="wink"] .widget-launcher-eyes-preview .is-wink-eye {
    animation-name: widgetLauncherPreviewBlink;
    animation-duration: 4.5s;
    animation-iteration-count: infinite;
}


@keyframes widgetLauncherPreviewBlink {

    0%,
    92%,
    100% {
        height: 7px;
    }

    95% {
        height: 1px;
    }
}

.widget-launcher-special-settings {
    display: flex;
    flex-direction: column;
    gap: 6px;

    margin-left: 16px;
}

.widget-launcher-special-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-launcher-special-label,
.widget-launcher-special-unit {
    font-size: 12px;
    color: var(--text-secondary);
}

.widget-launcher-special-settings input {
    width: 54px;
    height: 34px;

    border: 1px solid var(--surface-soft-border);
    border-radius: var(--radius-sm);

    padding: 0 8px;

    font-size: 13px;
    text-align: center;
}


/* ===============================================
   MODAL AVATAR PROFILE
   ===============================================*/
.profile-avatar-wrapper {
    position: relative;
}

.profile-avatar-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    transform: translateX(-40%);

    min-width: 120px;
    width: max-content;

    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
    padding: 6px;
    display: none;
    z-index: 50;
}

.profile-avatar-menu.active {
    display: flex;
    flex-direction: column;
}

.profile-avatar-menu-action {
    border: none;
    background: transparent;
    height: 34px;
    border-radius: 8px;
    padding: 0 10px;
    text-align: left;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.profile-avatar-menu-action:hover {
    background: #f1f5f9;
}

.profile-avatar-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 999px;
    color: #9ca3af;
}

.profile-avatar-placeholder svg {
    width: 32px;
    height: 32px;
}

.profile-avatar-wrapper .profile-avatar-placeholder {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;

    color: #94a3b8;
}

.profile-avatar-wrapper .profile-avatar-placeholder svg {
    width: 52px;
    height: 52px;
}




/* =========================================
   BILLING PLAN HERO
   ========================================= */

.billing-plan-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    margin-top: 34px;
    margin-bottom: 18px;
}

.billing-plan-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.billing-plan-icon {
    width: 100px;
    height: 100px;
    object-fit: contain;
    flex-shrink: 0;
}

.billing-plan-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.billing-plan-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.billing-plan-name {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
}


.billing-plan-description {
    max-width: 360px;

    font-size: 14px;
    line-height: 1.55;

    color: #64748b;
}

.billing-plan-right {
    text-align: right;
}

.billing-plan-price {
    font-size: 30px;
    font-weight: 700;
    color: #0f172a;
}

.billing-plan-price-label {
    margin-top: 6px;

    font-size: 14px;
    color: #64748b;
}

.billing-plan-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;

    /* padding-top: 18px;
    margin-top: 18px;  */

    /* border-top: 1px solid #e5e7eb; */
}

.billing-plan-meta-label {
    font-size: 14px;
    color: #64748b;
}

.billing-plan-meta-value {
    margin-top: 0px;

    font-size: 20px;
    font-weight: 600;
    color: #0f172a;
}

.billing-plan-title {
    font-size: 18px;
    font-weight: 700;
}

.billing-plan-description-top {
    font-size: 14px;
}

.billing-plan-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.billing-subscription-card {
    gap: 0;
}

.billing-plan-change-box {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.billing-plan-change-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.billing-plan-change-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.billing-plan-change-desc {
    margin-top: 4px;
    font-size: 14px;
    color: #64748b;
}

.billing-plan-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.billing-plan-card {
    position: relative;

    padding: 22px 20px;

    border: 1px solid #e5e7eb;
    border-radius: 14px;

    text-align: center;
    background: #ffffff;

    display: flex;
    flex-direction: column;
    align-items: center;
}

.billing-plan-card.is-current {
    border-color: #8b5cf6;
}

.billing-plan-current-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #ede9fe;
    color: #7c3aed;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.billing-plan-card-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 18px;
}

.billing-plan-card-name {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

.billing-plan-card-desc {
    margin-top: 6px;
    font-size: 13px;
    color: #64748b;
}

.billing-plan-card-price {
    margin-top: 18px;

    font-size: 24px;
    line-height: 1;

    font-weight: 700;
    color: #0f172a;
}

.billing-plan-card-period {
    margin-top: 6px;
    margin-bottom: 20px;

    font-size: 14px;
    color: #64748b;
}

.billing-plan-change-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.billing-plan-pending-change {
    margin-top: 20px;

    padding: 16px 18px;

    border: 1px solid #fed7aa;
    border-radius: 10px;

    background: #fff7ed;
}

.billing-plan-pending-change-title {
    font-size: 14px;
    font-weight: 700;
    color: #9a3412;
}

.billing-plan-pending-change-description {
    margin-top: 6px;

    font-size: 14px;
    line-height: 1.5;

    color: #9a3412;
}

.billing-plan-pending-change-actions {
    margin-top: 12px;
}

.billing-plan-card.is-selected {
    border-color: #1565C0;

    background: rgba(21, 101, 192, 0.04);

    box-shadow:
        0 0 0 1px rgba(21, 101, 192, 0.15);
}

.billing-plan-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.billing-plan-top {
    display: flex;
    align-items: center;
    gap: 24px;
}

.billing-plan-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.billing-plan-description {
    max-width: 360px;
    font-size: 14px;
    line-height: 1.55;
    color: #64748b;
}

/* =========================================
   ACTIVE ADDONS
   ========================================= */

.billing-active-addons {
    margin-top: 10px;
    padding-top: 24px;

    /*  border-top: 1px solid #e5e7eb; */
}

.billing-active-addons-head {
    margin-bottom: 18px;
}

.billing-active-addons-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.billing-active-addons-desc {
    margin-top: 4px;

    font-size: 14px;
    color: #64748b;
}

.billing-active-addons-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.billing-active-addon-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    padding: 16px 18px;

    border: 1px solid #e5e7eb;
    border-radius: 12px;

    background: #ffffff;
}

.billing-active-addon-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.billing-active-addon-icon {
    width: 52px;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;
}

.billing-active-addon-icon svg {
    width: 24px;
    height: 24px;
}

.billing-active-addon-icon.is-ai {
    background: rgba(124, 92, 252, 0.10);
    color: #7C5CFC;
}

.billing-active-addon-icon.is-chat {
    background: rgba(21, 101, 192, 0.10);
    color: #1565C0;
}

.billing-active-addon-icon.is-automation {
    background: rgba(15, 23, 42, 0.08);
    color: #334155;
}

.billing-active-addon-icon.is-operator {
    background: rgba(21, 101, 192, 0.10);
    color: #1565C0;
}

.billing-active-addon-name {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

.billing-active-addon-effect {
    margin-top: 4px;

    font-size: 14px;
    color: #64748b;
}

.billing-active-addon-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.billing-active-addon-price {
    text-align: right;

    font-size: 20px;
    font-weight: 700;

    color: #0f172a;
}

.billing-active-addon-price-label {
    margin-top: 4px;

    font-size: 13px;
    text-align: right;

    color: #64748b;
}

.billing-active-addon-price-block {
    display: grid;
    grid-template-columns: auto;
    justify-items: end;
    /* row-gap: 4px; */
}

.billing-active-addon-price-block .btn {
    margin-top: 10px;
}

.billing-active-addon-pending {
    margin-top: 10px;

    font-size: 13px;
    font-weight: 600;
    text-align: right;

    color: #9a3412;
}

.billing-active-addon-top {
    display: flex;
    align-items: center;
    gap: 16px;
}

.billing-active-addon-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}



/* =========================================
   BILLING USAGE
   ========================================= */

.billing-usage-head {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 24px;
}

.billing-usage-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.billing-usage-renewal {
    margin-top: 4px;

    font-size: 14px;
    color: #64748b;
}

.billing-usage-list {
    display: flex;
    flex-direction: column;
}

.billing-usage-divider {
    height: 30px;
}

.billing-usage-item {
    display: flex;
    gap: 16px;

    padding: 12px 0;
}

.billing-usage-icon {
    width: 48px;
    height: 48px;

    border-radius: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;
}

.billing-usage-content {
    flex: 1;
}

.billing-usage-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.billing-usage-name {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.billing-usage-desc {
    margin-top: 2px;

    font-size: 13px;
    color: #64748b;
}

.billing-usage-value {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.billing-usage-progress {
    margin-top: 12px;

    height: 6px;

    background: #e5e7eb;
    border-radius: 999px;

    overflow: hidden;
}

.billing-usage-progress-bar {
    height: 100%;

    background: #7C5CFC;

    border-radius: 999px;
}

.billing-usage-stats {
    display: flex;
    align-items: center;
    gap: 24px;

    min-width: 140px;
    justify-content: flex-end;
}

.billing-usage-percent {
    width: 48px;

    text-align: right;

    font-size: 14px;
    font-weight: 600;

    color: #64748b;
}



.billing-usage-icon svg {
    width: 22px;
    height: 22px;
}

.billing-usage-icon.usage-ai {
    background: rgba(124, 92, 252, 0.10);
    color: #7C5CFC;
}

.billing-usage-icon.usage-chat {
    background: rgba(21, 101, 192, 0.10);
    color: #1565C0;
}

.billing-usage-icon.usage-automation {
    background: rgba(15, 23, 42, 0.08);
    color: #334155;
}

.billing-usage-icon.usage-user {
    background: rgba(21, 101, 192, 0.10);
    color: #1565C0;
}

.billing-usage-icon.usage-domain {
    background: rgba(21, 101, 192, 0.10);
    color: #1565C0;
}



.billing-usage-progress-bar.is-good {
    background: #22c55e;
}

.billing-usage-progress-bar.is-warning {
    background: #f59e0b;
}

.billing-usage-progress-bar.is-critical {
    background: #ef4444;
}

.billing-usage-progress-bar.is-neutral {
    background: #7C5CFC;
}

.billing-active-addon-pending-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.billing-active-addon-pending {
    font-size: 13px;
    font-weight: 600;
    text-align: right;
    color: #9a3412;
}



/* =========================================
   ADDON MARKETPLACE
   ========================================= */

.billing-addon-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.billing-addon-section+.billing-addon-section {
    margin-top: 28px;
}

.billing-addon-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.billing-addon-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.billing-addon-card {
    display: flex;
    flex-direction: column;
    gap: 8px;

    padding: 16px;
}

.billing-addon-card-name {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.billing-addon-card-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

.billing-addon-card-price {
    margin-top: auto;

    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.billing-addon-card-top {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.billing-addon-card-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.billing-addon-card-pricing {
    margin-top: auto;
}

.billing-addon-card-period {
    margin-top: 4px;

    font-size: 13px;
    color: #64748b;
}

.billing-addon-card-footer {
    margin-top: auto;

    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
}

.billing-addon-card-actions .btn {
    min-width: 130px;
}

.billing-addon-card-actions .btn.btn-md {
    padding: 7px 30px;
}




/* =========================================
   INVOICE ADDRESS
   ========================================= */

.billing-invoice-section {
    gap: 22px;
}

.billing-invoice-grid {
    display: grid;
    gap: 18px 14px;
}

.billing-invoice-grid-3 {
    grid-template-columns: 1.4fr 1fr 0.8fr;
}

.billing-invoice-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.billing-invoice-label {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.billing-invoice-input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    display: block;
}

.billing-invoice-grid-address-top {
    grid-template-columns: 2fr 1fr 1fr;
}

.billing-invoice-grid-address-bottom {
    grid-template-columns: 1fr 2fr;
}

.billing-invoice-grid-contact {
    grid-template-columns: 2fr 1fr;
}

.billing-invoice-actions {
    display: flex;
    justify-content: flex-end;
}


/* =========================================
   INVOICE VIEW
   ========================================= */

.billing-invoices-table {
    margin-top: 28px;
}

.billing-invoice-row {
    display: grid;
    grid-template-columns: 2fr 120px 140px 140px 140px;
    align-items: center;
    gap: 20px;

    padding: 18px 0;

    border-top: 1px solid #e5e7eb;
}

.billing-invoice-row:first-child {
    border-top: none;
    padding-top: 0;
}

.billing-invoice-number {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.billing-invoice-provider {
    margin-top: 4px;

    font-size: 13px;
    color: #64748b;
}

.billing-invoice-row-date,
.billing-invoice-row-status {
    font-size: 14px;
    color: #64748b;
}

.billing-invoice-row-amount {
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
}

.billing-invoice-row-actions {
    display: flex;
    justify-content: flex-end;
}



/* =========================================
   BILLING HISTORY
   ========================================= */

.billing-history-card {
    gap: 24px;
}

.billing-history-list {
    display: flex;
    flex-direction: column;
}

.billing-history-item {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 24px;
    align-items: flex-start;

    padding: 16px 0;

    border-top: 1px solid #e5e7eb;
}

.billing-history-item:first-child {
    border-top: none;
    padding-top: 0;
}

.billing-history-title {
    font-size: 13px;
    font-weight: 400;
    color: #0f172a;
}

.billing-history-description {
    margin-top: 4px;

    font-size: 13px;
    color: #64748b;
}

.billing-history-date {
    text-align: right;

    font-size: 13px;
    color: #64748b;
}



/* =========================================
   AGENTS SUMMARY
   ========================================= */
.team-summary-stats {
    display: flex;
    gap: 16px;
}

.team-summary-stat {
    flex: 1;

    padding: 18px;

    border: 1px solid #e5e7eb;
    border-radius: 12px;

    background: #ffffff;
}

.team-summary-stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;

    color: #0f172a;
}

.team-summary-stat-label {
    margin-top: 8px;

    font-size: 13px;
    color: #64748b;
}

.team-user-row {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 16px 0;

    border-top: 1px solid #e5e7eb;
}

.team-user-row:first-child {
    border-top: none;
    padding-top: 0;
}

.team-user-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.team-user-avatar {
    width: 42px;
    height: 42px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    font-size: 14px;
    font-weight: 700;

    background: rgba(21, 101, 192, 0.10);
    color: #1565C0;
}

.team-user-avatar-image {
    width: 100%;
    height: 100%;

    border-radius: 50%;

    object-fit: cover;

    display: block;
}

.team-user-info {
    display: flex;
    flex-direction: column;
}

.team-user-name {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.team-user-email {
    margin-top: 2px;

    font-size: 13px;
    color: #64748b;
}

.team-user-badges {
    display: flex;
    align-items: center;
    gap: 8px;
}

.team-role-badge {
    min-width: 120px;
    text-align: center;
}

.team-permissions-badge {
    min-width: 140px;
    text-align: center;
}



/* =========================================
   AGENTS INVITES
   ========================================= */

.team-invite-role-grid {
    max-width: 380px;
}

/* =========================================
   AGENTS STATUS ACTIVE / NON ACTIVE
   ========================================= */

.team-user-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.team-user-status-dot {
    position: absolute;
    right: -1px;
    bottom: -1px;

    width: 12px;
    height: 12px;

    border-radius: 50%;
    border: 2px solid #ffffff;

    background: #9ca3af;
}

.team-user-status-active {
    background: #22c55e;
}

.team-user-status-blocked {
    background: #ef4444;
}

.team-user-status-invited {
    background: #f59e0b;
}

.team-user-row-blocked .team-user-avatar-wrapper,
.team-user-row-blocked .team-user-info,
.team-user-row-blocked .team-user-badges {
    opacity: 0.5;
}

.team-user-row-blocked .team-user-actions {
    opacity: 1;
}

.team-user-actions {
    display: flex;
    gap: 8px;
    min-width: 310px;
    justify-content: flex-end;
}

.team-user-actions .btn {
    min-width: 90px;
}

.team-user-actions .team-edit-btn {
    width: 90px;
    min-width: 90px;
}

.team-user-actions .team-disable-btn,
.team-user-actions .team-unblock-btn {
    width: 100px;
    min-width: 100px;
}

.team-user-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.team-user-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}



/* =====================================================
   WIDGET APPEARANCE LAYOUT
   ===================================================== */

.widget-appearance-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}



/* =====================================================
   RESPONSIVE FOUNDATION
   ===================================================== */

@media (max-width: 767px) {

    /* =====================================================
       LAYOUT
       ===================================================== */

    .sx-settings {
        max-width: 100%;
    }

    .sx-row {
        flex-direction: column;
        align-items: stretch;
    }

    .sx-card {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .setting-row-info,
    .setting-row-control {
        width: 100%;
        min-width: 0;
    }

    /* =====================================================
       TABS
       ===================================================== */

    .ui-tabs,
    .sx-tabs,
    .settings-tabs {
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        max-width: 100%;
    }

    .ui-tab,
    .sx-tabs .settings-tab,
    .settings-tabs .settings-tab {
        flex: 0 0 auto;
    }

    /* =====================================================
       FORMS
       ===================================================== */

    .sx-input,
    .sx-select,
    .sx-textarea {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* =====================================================
       ACCOUNT
       ===================================================== */

    .sx-card[data-settings-context="account-hours-enabled"] {
        flex-direction: row;
        align-items: center;
    }

    .sx-card[data-settings-context="account-hours-enabled"] .setting-row-info {
        flex: 1;
        min-width: 0;
    }

    .working-day-row {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 12px;
        align-items: center;
    }

    .day-name {
        grid-column: 1 / 2;
    }

    .working-day-row .switch {
        grid-column: 2 / 3;
        grid-row: 1;
    }

    .day-ranges {
        grid-column: 1 / -1;
    }

    .add-time-range {
        grid-column: 1 / -1;
        justify-self: flex-start;
    }

    .extra-range {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .extra-range .time-separator {
        display: none;
    }

    .extra-range .remove-range {
        grid-column: 1 / -1;
        justify-self: flex-start;
    }

    /* =====================================================
       SYSTEM
       ===================================================== */
    .routing-switch.segmented-control {
        display: flex;
        width: 100%;
    }

    .routing-switch.segmented-control .routing-option {
        flex: 1;
        min-width: 0;
        padding: 0 8px;
    }

    /* =====================================================
       WIDGET
       ===================================================== */

    .widget-header-fields,
    .widget-header-field {
        width: 100%;
    }

    .widget-header-input,
    .widget-header-title-input {
        width: 100%;
    }

    .widget-header-input input {
        width: 100%;
    }

    .widget-header-field {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .widget-header-title-input {
        width: 100%;
        margin-left: 0;
    }

    .widget-status-control {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
    }

    .widget-status-dot-picker {
        flex: 0 0 56px;
    }

    .widget-status-control .widget-header-input {
        flex: 1;
        min-width: 0;
    }


    .widget-appearance-grid-2 {
        grid-template-columns: 1fr;
    }

    .widget-launcher-group {
        flex-wrap: wrap;
    }

    .widget-launcher-special-settings {
        width: 100%;
        margin-top: 8px;
    }

    .widget-launcher-special-settings {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        margin-top: 12px;
    }

    .widget-launcher-special-settings input {
        width: 70px;
    }

    .widget-launcher-group {
        justify-content: center;
    }

    .widget-color-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px;
        width: 100%;
        min-width: 0;
    }

    .widget-color-row,
    .widget-main-color-column,
    .widget-gradient-row,
    .widget-text-color-column {
        grid-column: auto !important;
        grid-row: auto !important;
        width: 100%;
        min-width: 0;
    }

    .widget-color-preset,
    .widget-text-color-preset,
    .widget-color-custom {
        width: 34px;
        height: 34px;
        flex: 0 0 34px;
    }

    .widget-color-row,
    .widget-text-color-row {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        row-gap: 14px;
    }

    .widget-main-color-input-row,
    .widget-text-color-row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px;
    }

    .widget-color-hex,
    .widget-text-color-hex {
        width: 100% !important;
    }

    .widget-main-color-description,
    .widget-text-color-column .setting-row-description {
        margin-bottom: 4px;
    }

    .widget-gradient-header {
        display: flex;
        justify-content: space-between;
        width: 100%;
    }

    .widget-gradient-value {
        margin-left: 0;
    }

    .widget-main-color-column {
        margin-top: 6px;
    }

    .widget-color-row {
        margin-bottom: 12px;
    }

    .widget-main-color-description {
        margin-top: 6px;
    }

    .widget-gradient-row {
        width: 100% !important;
        min-width: 0 !important;
        margin-top: 14px;
    }

    .widget-gradient-range {
        width: 100% !important;
    }

    .sx-card[data-settings-context="widget-appearance-avatars"] {
        overflow: visible;
    }

    .widget-avatar-group {
        overflow: visible;
    }

    .widget-avatar-menu {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        z-index: 100;
    }

    .widget-avatar-item[data-avatar-type="operator"] .widget-avatar-menu {
        left: 0;
        right: auto;
        transform: none;
    }

    .widget-avatar-item[data-avatar-type="offline"] .widget-avatar-menu {
        left: auto;
        right: 0;
        transform: none;
    }

    /* =====================================================
       AGENTS
       ===================================================== */

    .team-user-left,
    .team-user-info {
        min-width: 0;
    }

    .team-user-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .team-user-meta {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        width: 100%;
        min-width: 0;
    }

    .team-user-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
        width: 100%;
        min-width: 0;
    }

    .team-user-badges {
        display: grid;
        grid-template-columns: 86px minmax(0, 1fr);
        gap: 8px;
        width: 100%;
        min-width: 0;
    }

    .team-role-badge {
        min-width: 0;
        width: 100%;
        padding-left: 6px;
        padding-right: 6px;
    }

    .team-permissions-badge {
        min-width: 0;
        width: auto;
        justify-self: start;
        padding-left: 6px;
        padding-right: 6px;
    }

    .team-invite-role-grid,
    .billing-invoice-grid-contact {
        grid-template-columns: 1fr;
    }

    .billing-invoice-grid-contact .billing-invoice-input {
        max-width: 280px;
    }

    /* =====================================================
       PAYMENTS
       ===================================================== */

    .billing-plan-hero {
        flex-direction: column;
        align-items: stretch;
        margin-top: 22px;
        margin-bottom: 10px;
        gap: 14px;

    }

    .billing-plan-left {
        display: flex;

        gap: 12px;
    }

    .billing-plan-top {
        display: grid;
        grid-template-columns: 70px 1fr;
        align-items: center;
        justify-content: flex-start;
        column-gap: 16px;
    }

    .billing-plan-price {
        font-size: 24px;
        text-align: right;
    }

    .billing-plan-right {
        text-align: right;
    }

    .billing-plan-icon {
        width: 70px;
        height: 70px;
    }

    .billing-plan-content {
        display: block;
    }

    .billing-plan-description {
        text-align: center;
    }

    .billing-plan-meta {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .billing-plan-actions-inline {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        width: 100%;
    }

    .billing-plan-actions-inline .btn {
        width: 100%;
    }

    .billing-active-addon-item {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .billing-active-addon-icon {
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
    }

    .billing-active-addon-top {
        display: grid;
        grid-template-columns: 52px 1fr;
        column-gap: 14px;
        align-items: center;
        width: 100%;
    }

    .billing-active-addon-content {
        display: contents;
    }

    .billing-active-addon-name {
        font-size: 17px;
        line-height: 1.25;
    }

    .billing-active-addon-effect {
        grid-column: 1 / -1;
        margin-top: 10px;
        text-align: center;
    }

    .billing-plan-description,
    .billing-active-addon-effect {
        display: none;
    }

    /* PLANS CHANGE */

    .billing-plan-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .billing-plan-change-desc {
        display: none;
    }

    .billing-plan-change-actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .billing-plan-change-actions .btn {
        width: 100%;
    }

    /* ------------------------------- */

    .billing-usage-top {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .billing-usage-stats {
        align-items: flex-start;
        text-align: left;
    }

    .billing-usage-desc {
        display: none;
    }

    .billing-usage-name {
        font-size: 14px;
    }

    /* -------- Addons -----------------*/

    .billing-addon-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .billing-addon-card {
        min-height: 0;
        padding: 14px;
    }

    .billing-addon-card .billing-active-addon-icon {
        width: 44px;
        height: 44px;
    }

    .billing-addon-card .billing-active-addon-icon svg {
        width: 20px;
        height: 20px;
    }

    .billing-addon-card-footer {
        margin-top: 18px;
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        margin-top: 0;
        gap: 5px;
    }

    .billing-addon-card-top {
        margin-bottom: 18px;
        display: flex;
        align-items: center;
        gap: 14px;
        margin-bottom: 14px;
    }

    .billing-addon-card-name {
        font-size: 14px;
        font-weight: 700;
        line-height: 1.3;
    }

    .billing-addon-card-desc {
        display: none;
    }

    .billing-addon-card-price {
        font-size: 18px;
    }

    .billing-addon-card-actions .btn {
        min-width: 100px;
    }

    .billing-addon-card-actions .btn.btn-md {
        padding: 7px 20px;
    }

    /* --------- Invoices ---------------*/

    .billing-invoice-grid,
    .billing-invoice-grid-3,
    .billing-invoice-grid-address-top,
    .billing-invoice-grid-address-bottom,
    .billing-invoice-grid-contact {
        grid-template-columns: 1fr;
    }

    .billing-invoice-row {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 10px;
        padding: 18px 0;
    }

    .billing-invoice-row-number,
    .billing-invoice-row-date,
    .billing-invoice-row-actions {
        grid-column: 1 / -1;
        width: 100%;
        min-width: 0;
    }

    .billing-invoice-row-amount {
        grid-column: 1;
        width: auto;
        min-width: 0;
    }

    .billing-invoice-row-status {
        grid-column: 2;
        justify-self: end;
        width: auto;
        min-width: 0;
    }

    .billing-invoice-row-actions .btn {
        width: 100%;
    }

    .billing-history-item {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 18px 0;
    }

    .billing-history-item>div {
        width: 100%;
        min-width: 0;
    }

    .billing-history-date {
        order: 2;
        font-size: 13px;
        color: #64748b;
        text-align: left;
    }

    .billing-history-description {
        order: 3;
        margin-top: 0;
    }


    /* =====================================================
       NOTIFICATIONS
       ===================================================== */

    /* tutaj będziemy dopisywać */

}


/* =====================================================
   TABLET (768–1023 px)
   ===================================================== */

@media (min-width:768px) and (max-width:1023px) {



    /* =====================================================
       WIDGET
       ===================================================== */

    .widget-appearance-grid-2 {
        grid-template-columns: 1fr;
    }

    .widget-header-card .sx-input {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .widget-header-field {
        grid-template-columns: 130px minmax(0, 1fr);
    }

    .widget-header-title-input,
    .widget-status-control {
        width: 100%;
        min-width: 0;
    }

    .widget-status-control .widget-header-input {
        flex: 1;
        min-width: 0;
    }

    /* =====================================================
       AGENTS
       ===================================================== */

    .team-user-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .team-user-right {
        width: 100%;
        min-width: 0;
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .team-user-meta {
        width: 100%;
        min-width: 0;
    }

    .team-user-badges {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .team-user-actions {
        width: 100%;
        min-width: 0;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .billing-invoice-grid-contact {
        grid-template-columns: 1fr;
    }

    .billing-invoice-grid-contact .billing-invoice-input {
        max-width: 280px;
    }


    /* =====================================================
   PAYMENTS
   ===================================================== */

    .billing-addon-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .billing-addon-card-footer {
        margin-top: auto;
        display: flex;
        align-items: flex-end;
        gap: 8px;
        width: 100%;
    }

    .billing-addon-card-pricing {
        flex: 1 1 auto;
        min-width: 0;
    }

    .billing-addon-card-actions {
        flex: 0 0 auto;
        margin-left: auto;
    }

    .billing-addon-card-actions .btn {
        min-width: 100px;
    }

    .billing-addon-card-actions .btn.btn-md {
        padding: 7px 18px;
    }

    .billing-plan-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 16px;
    }

    /* --------- Invoices --------------- */

    .billing-invoice-row {
        display: grid;
        grid-template-columns: minmax(0, 1.4fr) auto auto;
        gap: 12px 18px;
        align-items: center;
    }

    .billing-invoice-row-number {
        min-width: 0;
    }

    .billing-invoice-row-date,
    .billing-invoice-row-amount,
    .billing-invoice-row-status {
        white-space: nowrap;
    }

    .billing-invoice-row-actions {
        grid-column: 1 / -1;
        justify-self: end;
        width: 140px;
    }

    .billing-invoice-row-actions .btn {
        width: 100%;
    }

}




/* =====================================================
   TABLET NARROW — WIDGET COLORS (768–843 px)
   ===================================================== */

@media (min-width:768px) and (max-width:843px) {

    .sx-card[data-settings-context="widget-appearance-colors"] .widget-color-layout {
        display: flex;
        flex-direction: column;
        gap: 16px;
        width: 100%;
        min-width: 0;
    }

    .sx-card[data-settings-context="widget-appearance-colors"] .widget-color-row,
    .sx-card[data-settings-context="widget-appearance-colors"] .widget-main-color-column,
    .sx-card[data-settings-context="widget-appearance-colors"] .widget-gradient-row,
    .sx-card[data-settings-context="widget-appearance-colors"] .widget-text-color-column {
        width: 100%;
        min-width: 0;
    }

    .sx-card[data-settings-context="widget-appearance-colors"] .widget-color-row,
    .sx-card[data-settings-context="widget-appearance-colors"] .widget-text-color-row {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        row-gap: 14px;
    }

    .sx-card[data-settings-context="widget-appearance-colors"] .widget-color-hex,
    .sx-card[data-settings-context="widget-appearance-colors"] .widget-text-color-hex {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .sx-card[data-settings-context="widget-appearance-colors"] .widget-gradient-range {
        width: 100%;
    }

    .sx-card[data-settings-context="widget-appearance-colors"] .widget-main-color-description {
        position: static;
    }

    .sx-card[data-settings-context="widget-appearance-colors"] .widget-main-color-input-row {
        margin-top: 12px;
    }
}


/* =====================================================
   WIDGET  (844–1023px)
   ===================================================== */
@media (min-width:844px) and (max-width:1023px) {

    .widget-launcher-icons {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        width: 100%;
    }

    .widget-launcher-group {
        margin: 0;
    }

    .sx-card[data-settings-context="widget-appearance-position"] {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        column-gap: 20px;
    }

    .sx-card[data-settings-context="widget-appearance-position"] .setting-row-info {
        min-width: 0;
    }

    .sx-card[data-settings-context="widget-appearance-position"] .routing-section {
        justify-self: end;
    }

}

/* =====================================================
   TABLET NARROW — NOTIFICATIONS (768–868 px)
   ===================================================== */

@media (min-width:768px) and (max-width:868px) {

    .sx-select {
        min-width: 155px;
    }

}





/* =====================================================
   LAPTOP (1024–1599 px)
   ===================================================== */

@media (min-width:1024px) and (max-width:1599px) {

    /* NOTYFICTIONS */
    .sx-select {
        min-width: 200px;
    }

    /* AGENTS */

    .team-user-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .team-user-left,
    .team-user-info,
    .team-user-right,
    .team-user-meta {
        min-width: 0;
    }

    .team-user-right {
        width: 100%;
    }

    .team-user-meta {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px;
        width: 100%;
    }

    .team-user-badges {
        min-width: 0;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .team-role-badge {
        min-width: 100px;
    }

    .team-permissions-badge {
        min-width: 120px;
    }

    .team-user-actions {
        min-width: 0;
        width: auto;
        justify-content: flex-end;
        flex-wrap: nowrap;
    }

    .team-user-actions .btn,
    .team-user-actions .team-edit-btn,
    .team-user-actions .team-disable-btn,
    .team-user-actions .team-unblock-btn {
        min-width: 82px;
        width: 82px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .team-user-actions .team-delete-btn {
        min-width: 82px;
        width: 82px;
    }

    /* PLATNOŚCI */

    .billing-plan-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 20px;
        padding: 0 8px 12px;
    }

    .billing-plan-card {
        flex: 0 0 210px;
        min-width: 210px;
    }

    /* addons */

    .billing-addon-grid {
        display: flex;
        flex-wrap: nowrap;
        gap: 18px;

        overflow-x: auto;
        overflow-y: hidden;

        padding-bottom: 10px;
    }

    .billing-addon-card {
        flex: 0 0 220px;
        min-width: 220px;

        display: flex;
        flex-direction: column;
    }

    .billing-addon-card-footer {
        margin-top: auto;

        display: flex;
        align-items: flex-end;
        gap: 8px;

        width: 100%;
        min-width: 0;
    }

    .billing-addon-card-pricing {
        flex: 1 1 auto;
        min-width: 0;
    }

    .billing-addon-card-actions {
        flex: 0 0 auto;
        margin-left: auto;
    }

    .billing-addon-card-actions .btn {
        min-width: 100px;
    }

    .billing-addon-card-actions .btn.btn-md {
        padding: 7px 18px;
    }


    /* invoices */


    .billing-invoice-row {
        display: grid;
        grid-template-columns: minmax(90px, 1fr) 90px 80px 90px 90px;
        gap: 12px;
        align-items: center;
    }

    .billing-invoice-row-number {
        min-width: 0;
        word-break: break-word;
    }

    .billing-invoice-row-date,
    .billing-invoice-row-amount,
    .billing-invoice-row-status {
        white-space: nowrap;
    }

    .billing-invoice-row-actions {
        justify-self: end;
        width: 90px;
    }

    .billing-invoice-row-actions .btn {
        width: 90px;
        min-width: 90px;
        padding-left: 10px;
        padding-right: 10px;
    }

}




/* =====================================================
   DESKTOP (1600px +)
   ===================================================== */

@media (min-width:1600px) {

    /* NOTYFICTIONS */
    .sx-select {
        min-width: 200px;
    }

    /* AGENTS */

    .team-user-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .team-user-left,
    .team-user-info,
    .team-user-right,
    .team-user-meta {
        min-width: 0;
    }

    .team-user-right {
        width: 100%;
    }

    .team-user-meta {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px;
        width: 100%;
    }

    .team-user-badges {
        min-width: 0;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .team-role-badge {
        min-width: 100px;
    }

    .team-permissions-badge {
        min-width: 120px;
    }

    .team-user-actions {
        min-width: 0;
        width: auto;
        justify-content: flex-end;
        flex-wrap: nowrap;
    }

    .team-user-actions .btn,
    .team-user-actions .team-edit-btn,
    .team-user-actions .team-disable-btn,
    .team-user-actions .team-unblock-btn {
        min-width: 82px;
        width: 82px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .team-user-actions .team-delete-btn {
        min-width: 82px;
        width: 82px;
    }

    /* PLATNOŚCI */

    .billing-plan-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 20px;
        padding: 0 8px 12px;
    }

    .billing-plan-card {
        flex: 0 0 210px;
        min-width: 210px;
    }

    /* addons */

    .billing-addon-grid {
        display: flex;
        flex-wrap: nowrap;
        gap: 18px;

        overflow-x: auto;
        overflow-y: hidden;

        padding-bottom: 10px;
    }

    .billing-addon-card {
        flex: 0 0 220px;
        min-width: 220px;

        display: flex;
        flex-direction: column;
    }

    .billing-addon-card-footer {
        margin-top: auto;

        display: flex;
        align-items: flex-end;
        gap: 8px;

        width: 100%;
        min-width: 0;
    }

    .billing-addon-card-pricing {
        flex: 1 1 auto;
        min-width: 0;
    }

    .billing-addon-card-actions {
        flex: 0 0 auto;
        margin-left: auto;
    }

    .billing-addon-card-actions .btn {
        min-width: 100px;
    }

    .billing-addon-card-actions .btn.btn-md {
        padding: 7px 18px;
    }


    /* invoices */


    .billing-invoice-row {
        display: grid;
        grid-template-columns: minmax(90px, 1fr) 90px 80px 90px 90px;
        gap: 12px;
        align-items: center;
    }

    .billing-invoice-row-number {
        min-width: 0;
        word-break: break-word;
    }

    .billing-invoice-row-date,
    .billing-invoice-row-amount,
    .billing-invoice-row-status {
        white-space: nowrap;
    }

    .billing-invoice-row-actions {
        justify-self: end;
        width: 90px;
    }

    .billing-invoice-row-actions .btn {
        width: 90px;
        min-width: 90px;
        padding-left: 10px;
        padding-right: 10px;
    }





}