/* CODSHIPX_AI_R131_R4_R2_INBOX_MANAGEMENT */

.cx-r131-toolbar-button {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #dfe6ef;
    border-radius: 10px;
    background: #fff;
    color: #24344c;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 750;
    cursor: pointer;
}

.cx-r131-toolbar-button:hover {
    background: #f7f9fc;
}

.cx-r131-edit {
    margin-left: auto;
    padding: 4px 8px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #496bd7;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.cx-r131-edit:hover {
    background: #eef3ff;
}

.cx-r131-draft {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 3px 0;
    color: #8290a2;
    font-size: 9px;
}

.cx-r131-draft > div {
    display: flex;
    gap: 9px;
    align-items: center;
}

.cx-r131-draft b {
    font-weight: 700;
}

.cx-r131-draft button {
    border: 0;
    background: none;
    color: #52657d;
    font-size: 9px;
    font-weight: 800;
    cursor: pointer;
}

.cx-r131-correct {
    margin-left: 7px;
    padding: 2px 6px;
    border: 0;
    border-radius: 6px;
    background: rgba(255,255,255,.55);
    color: #5b704d;
    font-size: 9px;
    font-weight: 800;
    cursor: pointer;
}

#cx-r131-modal-root {
    position: fixed;
    inset: 0;
    z-index: 2147482000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 22px;
}

#cx-r131-modal-root.open {
    display: flex;
}

.cx-r131-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8,20,39,.48);
    backdrop-filter: blur(5px);
}

.cx-r131-modal {
    position: relative;
    width: min(900px,96vw);
    max-height: 92vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 20px;
    background: #f8fafc;
    box-shadow: 0 28px 80px rgba(10,25,46,.23);
}

#cx-r131-modal-root.wide .cx-r131-modal {
    width: min(1240px,97vw);
}

.cx-r131-modal-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px 16px;
    background: #fff;
    border-bottom: 1px solid #e6ebf1;
}

.cx-r131-modal-head h2 {
    margin: 3px 0;
    color: #17253a;
    font-size: 20px;
}

.cx-r131-modal-head p {
    margin: 0;
    color: #738198;
    font-size: 11px;
}

.cx-r131-kicker {
    color: #8794a7;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.cx-r131-close {
    width: 35px;
    height: 35px;
    border: 1px solid #dde5ee;
    border-radius: 10px;
    background: #fff;
    color: #526176;
    font-size: 21px;
    cursor: pointer;
}

.cx-r131-modal-body {
    overflow: auto;
    padding: 16px;
}

.cx-r131-modal-body form {
    display: grid;
    gap: 13px;
}

.cx-r131-card {
    padding: 15px;
    border: 1px solid #e3e9f1;
    border-radius: 15px;
    background: #fff;
}

.cx-r131-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 13px;
}

.cx-r131-card-head > div {
    display: grid;
    gap: 2px;
}

.cx-r131-card-head small {
    color: #8a96a6;
    font-size: 9px;
}

.cx-r131-card-head strong {
    color: #17263a;
    font-size: 13px;
}

.cx-r131-grid {
    display: grid;
    gap: 11px;
}

.cx-r131-grid.two {
    grid-template-columns: repeat(2,minmax(0,1fr));
}

.cx-r131-grid.three {
    grid-template-columns: repeat(3,minmax(0,1fr));
}

.cx-r131-grid label,
.cx-r131-history-filter label {
    display: grid;
    gap: 5px;
    color: #64758b;
    font-size: 9px;
    font-weight: 800;
}

.cx-r131-grid input,
.cx-r131-grid select,
.cx-r131-history-filter input,
.cx-r131-history-filter select,
.cx-r131-note textarea,
.cx-r131-new-note textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #dae2ec;
    border-radius: 9px;
    outline: none;
    background: #fff;
    color: #17263a;
    font-size: 11px;
}

.cx-r131-grid input:focus,
.cx-r131-grid select:focus,
.cx-r131-history-filter input:focus,
.cx-r131-history-filter select:focus,
.cx-r131-note textarea:focus,
.cx-r131-new-note textarea:focus {
    border-color: #9cacda;
    box-shadow: 0 0 0 3px rgba(73,107,215,.08);
}

.cx-r131-chip {
    height: fit-content;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 9px;
}

.cx-r131-chip.good {
    background: #edf7e8;
    color: #4e792f;
}

.cx-r131-chip.warn {
    background: #fff5df;
    color: #8e6b1d;
}

.cx-r131-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.cx-r131-tags label {
    cursor: pointer;
}

.cx-r131-tags input {
    position: absolute;
    opacity: 0;
}

.cx-r131-tags span {
    display: inline-flex;
    padding: 6px 9px;
    border: 1px solid #dce4ed;
    border-radius: 999px;
    background: #fff;
    color: #627187;
    font-size: 9px;
    font-weight: 800;
}

.cx-r131-tags input:checked + span {
    border-color: #c5d896;
    background: #eff6df;
    color: #56721d;
}

.cx-r131-notes {
    display: grid;
    gap: 9px;
}

.cx-r131-note {
    padding: 9px;
    border: 1px solid #e8edf3;
    border-radius: 11px;
    background: #fafbfd;
}

.cx-r131-note textarea {
    min-height: 70px;
    resize: vertical;
}

.cx-r131-note footer {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    margin-top: 7px;
}

.cx-r131-note footer small {
    color: #8e9bab;
    font-size: 8px;
}

.cx-r131-note footer div {
    display: flex;
    gap: 6px;
}

.cx-r131-new-note {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.cx-r131-new-note textarea {
    min-height: 75px;
    resize: vertical;
}

.cx-r131-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    position: sticky;
    bottom: -16px;
    padding-top: 12px;
    background: linear-gradient(
        to bottom,
        rgba(248,250,252,0),
        #f8fafc 32%
    );
}

#cx-r131-modal-root button.primary,
#cx-r131-modal-root button.soft,
#cx-r131-modal-root button.danger {
    padding: 8px 12px;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}

#cx-r131-modal-root button.primary {
    border: 1px solid #1c2f4e;
    background: #1c2f4e;
    color: #fff;
}

#cx-r131-modal-root button.soft {
    border: 1px solid #dce4ed;
    background: #fff;
    color: #53657c;
}

#cx-r131-modal-root button.danger {
    border: 1px solid #eed3d3;
    background: #fff5f5;
    color: #9b4b4b;
}

#cx-r131-modal-root button.small {
    padding: 5px 8px;
    font-size: 9px;
}

#cx-r131-modal-root button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.cx-r131-history-filter {
    display: grid;
    grid-template-columns:
        1.5fr
        repeat(5,minmax(110px,.8fr))
        auto
        auto;
    gap: 8px;
    align-items: end;
    margin-bottom: 13px;
}

.cx-r131-history-summary {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 3px 2px 9px;
    color: #738298;
    font-size: 10px;
}

.cx-r131-history-summary strong {
    color: #18283e;
}

.cx-r131-table-wrap {
    overflow: auto;
    border: 1px solid #e3e9f0;
    border-radius: 13px;
    background: #fff;
}

.cx-r131-table {
    width: 100%;
    min-width: 930px;
    border-collapse: collapse;
}

.cx-r131-table th {
    padding: 9px 11px;
    border-bottom: 1px solid #e8edf2;
    background: #f8fafc;
    color: #8692a2;
    text-align: left;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.cx-r131-table td {
    padding: 11px;
    border-bottom: 1px solid #edf1f4;
    color: #526278;
    font-size: 10px;
}

.cx-r131-table tr:last-child td {
    border-bottom: 0;
}

.cx-r131-table td:first-child {
    display: grid;
    gap: 2px;
}

.cx-r131-table td:first-child strong {
    color: #19283c;
}

.cx-r131-table td:first-child small {
    color: #8996a6;
}

.cx-r131-direction,
.cx-r131-status {
    display: inline-flex;
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 900;
    text-transform: capitalize;
}

.cx-r131-direction.outbound {
    background: #edf3ff;
    color: #4868a3;
}

.cx-r131-direction.inbound {
    background: #eaf8ef;
    color: #347554;
}

.cx-r131-status {
    background: #f0f3f7;
    color: #647287;
}

.cx-r131-status.ended {
    background: #edf7e8;
    color: #4c762e;
}

.cx-r131-status.missed,
.cx-r131-status.failed {
    background: #fff0f0;
    color: #9a4a4a;
}

.cx-r131-status.ringing,
.cx-r131-status.connecting {
    background: #fff6e5;
    color: #8b681f;
}

.cx-r131-pager {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 9px;
    margin-top: 11px;
    color: #77869a;
    font-size: 9px;
}

.cx-r131-loading,
.cx-r131-empty {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #7a899b;
    font-size: 10px;
}

.cx-r131-loading.large,
.cx-r131-empty.large {
    min-height: 280px;
}

.cx-r131-empty.large {
    flex-direction: column;
}

.cx-r131-empty.error {
    color: #984b4b;
}

.cx-r131-loading i {
    width: 13px;
    height: 13px;
    border: 2px solid #dce4ee;
    border-top-color: #536fac;
    border-radius: 50%;
    animation: cx-r131-spin .7s linear infinite;
}

.cx-r131-help {
    margin: 0;
    color: #76859a;
    font-size: 10px;
    line-height: 1.5;
}

#cx-r131-toast-host {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 2147483000;
    display: grid;
    gap: 7px;
}

.cx-r131-toast {
    max-width: 360px;
    padding: 10px 13px;
    border: 1px solid #dde6ee;
    border-radius: 10px;
    background: #fff;
    color: #283b52;
    box-shadow: 0 12px 34px rgba(14,32,55,.16);
    font-size: 10px;
    font-weight: 750;
}

.cx-r131-toast.warn {
    border-color: #edddb7;
}

.cx-r131-toast.error {
    border-color: #ebcece;
    color: #984848;
}

@keyframes cx-r131-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 980px) {
    .cx-r131-grid.two,
    .cx-r131-grid.three {
        grid-template-columns: 1fr;
    }

    .cx-r131-history-filter {
        grid-template-columns:
            repeat(2,minmax(0,1fr));
    }
}

@media (max-width: 640px) {
    #cx-r131-modal-root {
        padding: 7px;
    }

    .cx-r131-modal {
        width: 100%;
        max-height: 96vh;
        border-radius: 15px;
    }

    .cx-r131-modal-head {
        padding: 15px;
    }

    .cx-r131-modal-body {
        padding: 9px;
    }

    .cx-r131-history-filter {
        grid-template-columns: 1fr;
    }
}

/* CODSHIPX_AI_R131_R5_R3_SEARCH_LAYOUT_TRUE_MESSAGE_EDIT */

.cx-r131-fullview-icon {
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    font-size: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
}

.cx-r131-fullview-icon > * {
    display: none !important;
}

.cx-r131-fullview-icon::before {
    content: "⛶";
    display: block;
    font-size: 16px;
    line-height: 1;
    color: currentColor;
}

.cx-r131-message-actions {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 7px;
    vertical-align: middle;
}

.cx-r131-message-edit-button,
.cx-r131-message-actions .cx-r131-correct {
    border: 0;
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 9px;
    font-weight: 800;
    cursor: pointer;
}

.cx-r131-message-edit-button {
    background: rgba(255,255,255,.72);
    color: #3f5d9a;
}

.cx-r131-message-edit-button:hover {
    background: #fff;
}

.cx-r131-message-actions .cx-r131-correct {
    margin-left: 0;
}

.cx-r131-message-edit {
    display: grid;
    gap: 12px;
}

.cx-r131-message-edit > label {
    display: grid;
    gap: 6px;
    color: #64758b;
    font-size: 10px;
    font-weight: 800;
}

.cx-r131-message-edit textarea {
    box-sizing: border-box;
    width: 100%;
    min-height: 160px;
    resize: vertical;
    padding: 12px;
    border: 1px solid #d9e2ec;
    border-radius: 11px;
    outline: none;
    background: #fff;
    color: #17263a;
    font: inherit;
    font-size: 12px;
    line-height: 1.55;
}

.cx-r131-message-edit textarea:focus {
    border-color: #9cacda;
    box-shadow: 0 0 0 3px rgba(73,107,215,.08);
}

.cx-r131-edit-notice {
    display: grid;
    gap: 3px;
    padding: 11px 12px;
    border: 1px solid #dce5f2;
    border-radius: 11px;
    background: #f5f8fd;
}

.cx-r131-edit-notice strong {
    color: #243a5b;
    font-size: 11px;
}

.cx-r131-edit-notice span {
    color: #74839a;
    font-size: 10px;
}

.cx-r131-edit-count {
    display: flex;
    justify-content: flex-end;
    color: #8794a6;
    font-size: 9px;
}

/* CODSHIPX_AI_R131_R5_R9_SINGLE_NATIVE_FULLVIEW */

.cx-r131-r5-r9-fullview-canonical {
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;

    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;

    margin-left: 8px !important;
    padding: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    border: 1px solid #dfe6ef !important;
    border-radius: 11px !important;

    background: #fff !important;
    color: #52647a !important;

    cursor: pointer !important;
    box-shadow: none !important;
}

.cx-r131-r5-r9-fullview-canonical:hover {
    background: #f7f9fc !important;
    color: #172b4b !important;
}

.cx-r131-r5-r9-fullview-canonical
.cx-r72-fullview-text {
    display: none !important;
}

.cx-r131-r5-r9-fullview-canonical
.cx-r72-fullview-icon {
    display: block !important;
    font-size: 17px !important;
    line-height: 1 !important;
}
/* CODSHIPX_AI_R131_R5_R11_FULLVIEW_ICON_ONLY */
[data-codshipx-fullview-icon-only="1"]{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-width:44px !important;
  width:44px !important;
  padding-left:10px !important;
  padding-right:10px !important;
  gap:0 !important;
  font-size:0 !important;
}

[data-codshipx-fullview-icon-only="1"]::before{
  content:"⛶";
  font-size:14px;
  line-height:1;
}

[data-codshipx-fullview-icon-only="1"] > *{
  display:none !important;
}

/* CODSHIPX_AI_R131_R5_R13_COMPACT_FULLVIEW_BUTTON */

button[data-cx-r72-fullview="1"] {
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;

    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;

    padding: 0 !important;
    margin-left: 4px !important;
    margin-right: 4px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    gap: 0 !important;
}

button[data-cx-r72-fullview="1"] .cx-r72-fullview-icon {
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 1 !important;
}

/* CODSHIPX_AI_R131_R5_R14_R1_FULLVIEW_EXACT_SPECIFICITY */

.inbox-shell.r83-live-inbox
.chat-head-actions
> button.cx-r72-fullview-toggle[data-cx-r72-fullview="1"] {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;

    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;

    flex: 0 0 32px !important;

    padding: 0 !important;
    margin: 0 !important;
    gap: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    overflow: hidden !important;
    white-space: nowrap !important;
}

.inbox-shell.r83-live-inbox
.chat-head-actions
> button.cx-r72-fullview-toggle[data-cx-r72-fullview="1"]
> .cx-r72-fullview-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    position: static !important;
    inset: auto !important;

    width: 12px !important;
    min-width: 12px !important;
    max-width: 12px !important;

    height: 12px !important;
    min-height: 12px !important;
    max-height: 12px !important;

    flex: 0 0 12px !important;

    margin: 0 !important;
    padding: 0 !important;

    font-size: 12px !important;
    line-height: 12px !important;

    transform: none !important;
}

/* Retire the R11 pseudo-icon. Use the real React icon only. */
.inbox-shell.r83-live-inbox
.chat-head-actions
> button.cx-r72-fullview-toggle[data-cx-r72-fullview="1"]
::before {
    content: none !important;
    display: none !important;
}

/* R11 previously hid every child. Restore the real icon. */
.inbox-shell.r83-live-inbox
.chat-head-actions
> button.cx-r72-fullview-toggle[data-cx-r72-fullview="1"]
> * {
    display: none !important;
}

.inbox-shell.r83-live-inbox
.chat-head-actions
> button.cx-r72-fullview-toggle[data-cx-r72-fullview="1"]
> .cx-r72-fullview-icon {
    display: inline-flex !important;
}

/* CODSHIPX_AI_R131_R5_R16_R1_R1_LOGGED_OUT_WORKSPACE_SLOT
 *
 * Logged-out only.
 *
 * Keep the auth workspace-switcher visually absent while restoring
 * its layout box. This preserves the same vertical workspace slot
 * that exists in the logged-in sidebar.
 *
 * The logged-in real workspace switcher does not carry
 * .cx-r19-auth-workspace and is therefore untouched.
 */

.rail
.workspace-switcher.cx-r19-auth-workspace {
    display:flex !important;

    visibility:hidden !important;
    opacity:0 !important;

    pointer-events:none !important;
    user-select:none !important;

    flex-shrink:0 !important;
}

/* ==========================================================
   CODSHIPX_AI_R131_R5_R17_R3_SINGLE_AUTHORITY_FINAL
   ========================================================== */

/*
 * Logged-out sidebar:
 * preserve the exact native workspace-switcher layout geometry
 * without displaying the login workspace card.
 *
 * Logged-in .workspace-switcher is untouched.
 */
.rail
.workspace-switcher.cx-r19-auth-workspace-spacer {
    visibility: hidden !important;
    opacity: 0 !important;

    pointer-events: none !important;
    user-select: none !important;

    flex-shrink: 0 !important;
}

/*
 * One canonical R72-owned Full View icon beside Broadcast.
 */
button.cx-r131-r5-r17-r3-fullview-owned[
    data-cx-r72-fullview="1"
] {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;

    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;

    flex: 0 0 32px !important;

    margin: 0 0 0 6px !important;
    padding: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    gap: 0 !important;

    border: 1px solid #dfe6ef !important;
    border-radius: 10px !important;

    background: #fff !important;
    color: #52647a !important;

    box-shadow: none !important;
    cursor: pointer !important;

    font-size: 0 !important;
    line-height: 1 !important;
}

button.cx-r131-r5-r17-r3-fullview-owned[
    data-cx-r72-fullview="1"
]
> .cx-r72-fullview-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    position: static !important;
    inset: auto !important;

    width: 14px !important;
    min-width: 14px !important;
    max-width: 14px !important;

    height: 14px !important;
    min-height: 14px !important;
    max-height: 14px !important;

    flex: 0 0 14px !important;

    margin: 0 !important;
    padding: 0 !important;

    font-size: 14px !important;
    line-height: 14px !important;

    transform: none !important;
}

button.cx-r131-r5-r17-r3-fullview-owned[
    data-cx-r72-fullview="1"
][aria-pressed="true"] {
    background: #10213d !important;
    color: #fff !important;
    border-color: #10213d !important;
}

button.cx-r131-r5-r17-r3-fullview-owned[
    data-cx-r72-fullview="1"
]:hover {
    background: #f7f9fc !important;
    color: #172b4b !important;
}

/* ==========================================================
   CODSHIPX_AI_R131_R5_R17_R6_R1_LOGIN_FULLVIEW_FINAL
   ========================================================== */

.rail
.workspace-switcher.cx-r19-auth-workspace-login {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;

    pointer-events: auto !important;
    user-select: auto !important;

    flex-shrink: 0 !important;
    cursor: pointer !important;
}

/*
 * Override old:
 * .inbox-shell.r83-live-inbox
 * .inbox-list-head
 * .cx-r72-fullview-toggle { display:none!important; }
 *
 * Only for our canonical R17-R3 R72-owned control.
 */
.inbox-shell.r83-live-inbox
.inbox-list-head
[data-cx-r131-inbox-toolbar-actions="1"]
> button.cx-r72-fullview-toggle.cx-r131-r5-r17-r3-fullview-owned[data-cx-r72-fullview="1"][data-cx-r131-fullview-owned="1"] {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;

    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;

    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;

    flex: 0 0 32px !important;

    margin: 0 0 0 6px !important;
    padding: 0 !important;

    align-items: center !important;
    justify-content: center !important;

    gap: 0 !important;
}

.inbox-shell.r83-live-inbox
.inbox-list-head
[data-cx-r131-inbox-toolbar-actions="1"]
> button.cx-r72-fullview-toggle.cx-r131-r5-r17-r3-fullview-owned[data-cx-r72-fullview="1"][data-cx-r131-fullview-owned="1"]
> .cx-r72-fullview-icon {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;

    align-items: center !important;
    justify-content: center !important;

    width: 14px !important;
    height: 14px !important;

    margin: 0 !important;
    padding: 0 !important;

    font-size: 14px !important;
    line-height: 14px !important;
}
