.nxe.nxe {
    --nxe-bg:#f6f7fb;
    --nxe-surface-solid:#ffffff;
    --nxe-surface:rgba(20,22,45,0.035);
    --nxe-surface2:rgba(20,22,45,0.06);
    --nxe-border:rgba(20,22,45,0.12);
    --nxe-text:#191c2e;
    --nxe-muted:#6a6f86;
    --nxe-accent:#7c5cff;
    --nxe-accent-2:#0891b2;
    display:flex;
    flex-direction:column;
    flex:1 1 auto;
    height:100%;
    min-height:0;
    color:var(--nxe-text);
    background-color:var(--nxe-bg);
    background-image:radial-gradient(circle at 20% 0%, rgba(124,92,255,0.10), transparent 45%),radial-gradient(circle at 90% 10%, rgba(8,145,178,0.08), transparent 40%),linear-gradient(rgba(20,22,45,0.04) 1px, transparent 1px),linear-gradient(90deg, rgba(20,22,45,0.04) 1px, transparent 1px);
    background-size:100% 100%,100% 100%,38px 38px,38px 38px;
    font-family:Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
    font-size:16px;
    line-height:1.6;
    position:relative;
    box-sizing:border-box;
    touch-action:manipulation;
}

.nxe *,
.nxe *:before,
.nxe *:after {
    box-sizing:border-box;
}

.nxe .nxe-modal {
    display:none;
    position:fixed;
    top:0;
    right:0;
    bottom:0;
    left:0;
    z-index:2147483000;
    align-items:center;
    justify-content:center;
    padding:16px;
    background:rgba(20,22,45,0.45);
    opacity:0;
    transition:opacity 0.15s linear;
}

.nxe .nxe-modal-in {
    opacity:1;
}

.nxe .nxe-modal-in .nxe-modal-dialog {
    transform:none;
}

.nxe .nxe-modal-dialog {
    display:flex;
    flex-direction:column;
    width:100%;
    max-width:500px;
    max-height:88vh;
    background:var(--nxe-surface-solid);
    border:1px solid var(--nxe-border);
    border-radius:18px;
    box-shadow:0 18px 50px rgba(20,22,45,0.28);
    overflow:hidden;
    transform:translate(0,-50px);
    transition:transform 0.3s ease-out;
}

.nxe .nxe-modal-lg {
    max-width:800px;
}

.nxe .nxe-modal-head {
    display:flex;
    align-items:center;
    gap:12px;
    padding:14px 18px;
    border-bottom:1px solid var(--nxe-border);
}

.nxe .nxe-modal-title {
    flex:1;
    min-width:0;
    font-weight:700;
}

.nxe .nxe-modal-x {
    flex:0 0 auto;
    background:none;
    border:none;
    padding:0;
    color:var(--nxe-muted);
    cursor:pointer;
    display:flex;
}

.nxe .nxe-modal-x:hover {
    color:var(--nxe-text);
}

.nxe .nxe-modal-body {
    padding:16px 18px;
    overflow-y:auto;
}

.nxe .nxe-modal-lead {
    color:var(--nxe-muted);
    font-size:0.875em;
    margin-bottom:16px;
}

.nxe .nxe-modal-foot {
    display:flex;
    align-items:center;
    gap:10px;
    padding:12px 18px;
    border-top:1px solid var(--nxe-border);
}

.nxe .nxe-bar {
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:16px;
    min-height:36px;
}

.nxe .nxe-new {
    background:var(--nxe-surface);
    border:1px solid var(--nxe-border);
    color:var(--nxe-muted);
    border-radius:999px;
    padding:6px 14px;
    font:inherit;
    font-size:0.85rem;
    cursor:pointer;
    transition:all 0.15s ease;
}

.nxe .nxe-new:hover {
    color:var(--nxe-text);
    border-color:var(--nxe-accent);
}

.nxe .nxe-new:disabled {
    opacity:0.45;
    pointer-events:none;
}

.nxe .nxe-conn-owner {
    font-size:0.78rem;
    line-height:1.15;
}

.nxe .nxe-conn-mine {
    color:var(--nxe-muted);
}

.nxe .nxe-conn-public {
    color:var(--nxe-accent-2);
}

.nxe .nxe-conn-auth {
    font-size:0.75rem;
    cursor:pointer;
    text-decoration:none;
    display:inline-block;
}

.nxe .nxe-conn-owner i {
    margin-right:4px;
}

.nxe .nxe-conn-signin {
    color:#b8860b;
}

.nxe .nxe-conn-signout {
    color:var(--nxe-muted);
}

.nxe .nxe-hist {
    position:relative;
}

.nxe .nxe-hist>.nxe-new {
    display:inline-block;
}

.nxe .nxe-hist-menu {
    display:none;
    position:absolute;
    z-index:30;
    top:100%;
    left:0;
    margin-top:6px;
    min-width:15rem;
    max-height:60vh;
    overflow-y:auto;
    padding:4px;
    background:var(--nxe-surface-solid);
    border:1px solid var(--nxe-border);
    border-radius:10px;
    box-shadow:0 8px 24px rgba(20,22,45,0.14);
}

.nxe .nxe-hist-on>.nxe-hist-menu {
    display:block;
}

.nxe .nxe-hist-row {
    display:flex;
    align-items:center;
    gap:8px;
    border-radius:8px;
}

.nxe .nxe-hist-row:hover {
    background:var(--nxe-surface2);
}

.nxe .nxe-hist-pick {
    flex:1;
    min-width:0;
    background:none;
    border:none;
    text-align:left;
    padding:7px 8px;
    font:inherit;
    color:var(--nxe-text);
    cursor:pointer;
}

.nxe .nxe-hist-title {
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:0.9rem;
}

.nxe .nxe-hist-when {
    display:block;
    font-size:0.78rem;
    color:var(--nxe-muted);
}

.nxe .nxe-hist-del {
    flex:0 0 auto;
    background:none;
    border:none;
    padding:0 8px 0 0;
    color:#dc3545;
    cursor:pointer;
    display:flex;
}

.nxe .nxe-hist-del:hover {
    color:#d1495b;
}

.nxe .nxe-hist-empty {
    color:var(--nxe-muted);
    font-size:0.9rem;
    padding:7px 8px;
}

.nxe .nxe-danger {
    background:#d1495b;
    color:#fff;
    border:none;
    border-radius:999px;
    padding:6px 15px;
    font:inherit;
    font-size:0.82rem;
    cursor:pointer;
}

.nxe .nxe-danger:hover {
    filter:brightness(1.08);
}

.nxe .nxe-mem-edit {
    display:block;
    width:100%;
    min-height:38vh;
    background:var(--nxe-bg);
    border:1px solid var(--nxe-border);
    border-radius:10px;
    padding:10px 12px;
    color:var(--nxe-text);
    font:inherit;
    font-size:0.9rem;
    resize:vertical;
}

.nxe .nxe-mem-edit:focus {
    outline:none;
    border-color:var(--nxe-accent);
}

.nxe .nxe-mem-forget {
    background:none;
    border:none;
    padding:0;
    color:#d1495b;
    cursor:pointer;
    font:inherit;
    font-size:0.82rem;
}

.nxe .nxe-sched-row {
    background:var(--nxe-surface2);
    border:1px solid var(--nxe-border);
    border-radius:10px;
    padding:16px;
    margin-bottom:16px;
}

.nxe .nxe-sched-head {
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:8px;
}

.nxe .nxe-sched-interval {
    background:var(--nxe-surface);
    color:var(--nxe-text);
    border:1px solid var(--nxe-border);
    border-radius:8px;
    padding:6px 10px;
    font:inherit;
}

.nxe .nxe-sched-on {
    color:#2f7a5b;
}

.nxe .nxe-sched-remove {
    margin-left:auto;
    color:#d1495b;
}

.nxe .nxe-sched-prompt {
    width:100%;
    background:var(--nxe-surface);
    border:1px solid var(--nxe-border);
    border-radius:8px;
    padding:8px 10px;
    color:var(--nxe-text);
    font:inherit;
    font-size:0.9rem;
    resize:vertical;
}

.nxe .nxe-sched-empty {
    color:var(--nxe-muted);
    font-size:0.9rem;
    margin-bottom:10px;
}



.nxe .nxe-sched-save,
.nxe .nxe-mem-save {
    margin-left:auto;
    background:var(--nxe-accent);
    color:#fff;
    border:none;
    border-radius:999px;
    padding:6px 15px;
    font:inherit;
    font-size:0.82rem;
    cursor:pointer;
}

.nxe .nxe-sched-save:hover,
.nxe .nxe-mem-save:hover {
    filter:brightness(1.08);
}

.nxe .nxe-container {
    width:100%;
    padding-left:15px;
    padding-right:15px;
    margin-left:auto;
    margin-right:auto;
}

.nxe.nxe-sm .nxe-container {
    max-width:540px;
}

.nxe.nxe-md .nxe-container {
    max-width:720px;
}

.nxe.nxe-lg .nxe-container {
    max-width:960px;
}

.nxe.nxe-xl .nxe-container {
    max-width:1140px;
}

.nxe .nxe-mainwrap {
    position:relative;
    flex:1;
    min-height:0;
    padding-top:1rem;
}

.nxe .nxe-sidescroll {
    max-height:68vh;
    overflow-y:auto;
    padding-bottom:48px;
}

.nxe .nxe-thread,
.nxe .nxe-sidescroll {
    scrollbar-width:thin;
    scrollbar-color:transparent transparent;
}

.nxe .nxe-thread:hover,
.nxe .nxe-sidescroll:hover {
    scrollbar-color:var(--nxe-border) transparent;
}

.nxe .nxe-thread::-webkit-scrollbar,
.nxe .nxe-sidescroll::-webkit-scrollbar {
    width:8px;
}

.nxe .nxe-thread::-webkit-scrollbar-track,
.nxe .nxe-sidescroll::-webkit-scrollbar-track {
    background:transparent;
}

.nxe .nxe-thread::-webkit-scrollbar-thumb,
.nxe .nxe-sidescroll::-webkit-scrollbar-thumb {
    background:transparent;
    border-radius:999px;
}

.nxe .nxe-thread:hover::-webkit-scrollbar-thumb,
.nxe .nxe-sidescroll:hover::-webkit-scrollbar-thumb {
    background:var(--nxe-border);
}

.nxe .nxe-thread::-webkit-scrollbar-thumb:hover,
.nxe .nxe-sidescroll::-webkit-scrollbar-thumb:hover {
    background:var(--nxe-muted);
}

.nxe .nxe-main {
    display:flex;
    flex-wrap:wrap;
    height:100%;
    min-height:0;
    margin-left:-15px;
    margin-right:-15px;
}

.nxe .nxe-chat {
    position:relative;
    width:100%;
    padding-left:15px;
    padding-right:15px;
    display:flex;
    flex-direction:column;
    min-width:0;
    min-height:0;
    max-height:100%;
}

.nxe .nxe-side {
    position:relative;
    width:100%;
    padding-left:15px;
    padding-right:15px;
    order:-1;
}

.nxe.nxe-lg .nxe-side {
    order:0;
    flex:0 0 auto;
    width:auto;
    max-width:25%;
}

.nxe.nxe-lg .nxe-chat {
    flex:1 1 0;
    min-width:0;
}

.nxe .nxe-convinner {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:center;
    gap:8px 14px;
    padding-top:0.75rem;
}

.nxe .nxe-inputwrap {
    flex:1 1 100%;
    min-width:0;
}

.nxe.nxe-sm .nxe-convinner {
    flex-wrap:nowrap;
    padding-top:1rem;
}

.nxe.nxe-sm .nxe-inputwrap {
    flex:1 1 auto;
    max-width:560px;
}

.nxe .nxe-disclaimer {
    display:none;
    font-size:0.8rem;
    color:var(--nxe-muted);
    text-align:center;
    padding:0 1rem 0.5rem;
}

.nxe.nxe-sm .nxe-disclaimer {
    display:block;
}

.nxe .nxe-convbar {
    position:sticky;
    bottom:0;
    z-index:1020;
    flex:0 0 auto;
    border-top:1px solid var(--nxe-border);
    background:var(--nxe-bg);
    backdrop-filter:blur(10px);
}

.nxe .nxe-ring {
    visibility:hidden;
    line-height:0;
    flex:0 0 auto;
    width:38px;
    height:38px;
    cursor:pointer;
}

.nxe .nxe-usage-row {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:6px;
}

.nxe .nxe-usage-track {
    height:8px;
    border-radius:999px;
    background:var(--nxe-surface2);
    overflow:hidden;
    margin-bottom:6px;
}

.nxe .nxe-usage-fill {
    height:8px;
    border-radius:999px;
    background:var(--nxe-accent);
    width:0;
}

.nxe .nxe-usage-link {
    color:var(--nxe-accent);
}

.nxe .nxe-usage-note {
    font-size:0.85rem;
    color:var(--nxe-muted);
}

.nxe .nxe-usage-about {
    margin-top:12px;
}

.nxe .nxe-opt-group {
    padding:4px 0;
}

.nxe .nxe-opt-group + .nxe-opt-group {
    border-top:1px solid var(--nxe-border);
}

.nxe .nxe-opt-head {
    font-size:0.72rem;
    font-weight:700;
    letter-spacing:0.08em;
    text-transform:uppercase;
    color:var(--nxe-muted);
    padding:6px 8px 4px;
}

.nxe .nxe-opt {
    display:flex;
    align-items:center;
    gap:8px;
    width:100%;
    background:none;
    border:none;
    text-align:left;
    padding:7px 8px;
    border-radius:8px;
    font:inherit;
    font-size:0.9rem;
    color:var(--nxe-text);
    cursor:pointer;
}

.nxe .nxe-opt:hover {
    background:var(--nxe-surface2);
}

.nxe .nxe-model-caret {
    display:inline-flex;
    margin-left:4px;
}

.nxe .nxe-opt-mark {
    flex:0 0 14px;
    height:14px;
    display:flex;
    align-items:center;
    justify-content:center;
    color:var(--nxe-accent);
}

.nxe .nxe-model {
    position:relative;
    flex:0 0 auto;
    visibility:hidden;
    min-width:104px;
    margin-right:auto;
}

.nxe.nxe-sm .nxe-model {
    margin-right:0;
}

.nxe .nxe-menu {
    display:none;
    position:absolute;
    z-index:30;
    bottom:100%;
    left:0;
    margin-bottom:6px;
    min-width:11rem;
    max-height:60vh;
    overflow-y:auto;
    padding:4px;
    background:var(--nxe-surface-solid);
    border:1px solid var(--nxe-border);
    border-radius:10px;
    box-shadow:0 8px 24px rgba(20,22,45,0.14);
}

.nxe.nxe-sm .nxe-menu {
    left:auto;
    right:0;
    max-height:none;
    overflow:visible;
}

.nxe .nxe-model-open>.nxe-menu {
    display:block;
}

.nxe .nxe-sub {
    position:relative;
}

.nxe .nxe-sub>.nxe-menu {
    position:static;
    min-width:0;
    max-height:none;
    overflow:visible;
    margin:4px 0 0;
    box-shadow:none;
}

.nxe.nxe-sm .nxe-sub>.nxe-menu {
    position:absolute;
    left:auto;
    right:100%;
    bottom:0;
    min-width:11rem;
    margin:0 4px 0 0;
    box-shadow:0 8px 24px rgba(20,22,45,0.14);
}

@media (hover:hover) {
    .nxe .nxe-sub:hover>.nxe-menu {
        display:block;
    }
}

.nxe .nxe-sub-open>.nxe-menu {
    display:block;
}

.nxe .nxe-sub-value {
    margin-left:auto;
    padding-left:12px;
    color:var(--nxe-muted);
    font-size:0.78rem;
}

.nxe .nxe-sub-caret {
    flex:0 0 auto;
    display:flex;
    color:var(--nxe-muted);
}

.nxe .nxe-guest {
    margin-left:8px;
    text-transform:none;
    letter-spacing:0;
    font-weight:400;
    opacity:0.6;
}

.nxe .nxe-section-label {
    color:var(--nxe-muted);
    text-transform:uppercase;
    letter-spacing:0.12em;
    font-size:0.72rem;
    font-weight:600;
    margin-bottom:8px;
}

.nxe .nxe-new i,
.nxe .nxe-chip i {
    margin-right:4px;
}

.nxe .nxe-chip i:only-child,
.nxe .nxe-sched-remove i {
    margin-right:0;
}

.nxe .nxe-sched-head .nxe-new {
    display:inline-flex;
    align-items:center;
    line-height:1;
}

.nxe .nxe-sched-add {
    margin-top:16px;
}

.nxe .nxe-sched-deploy {
    margin-top:10px;
    border-color:var(--nxe-accent);
    color:var(--nxe-accent);
}

.nxe .nxe-sched-note {
    margin-left:10px;
    color:var(--nxe-muted);
    font-size:0.8rem;
}

.nxe .nxe-sched-status {
    margin-left:10px;
    color:var(--nxe-muted);
    font-size:0.8rem;
}

.nxe .nxe-side-section {
    margin-top:24px;
}

.nxe .nxe-chip-block {
    width:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
}

.nxe .nxe-push {
    margin-left:auto;
}

.nxe .nxe-conn-row:hover {
    border-color:var(--nxe-accent);
}

.nxe .nxe-conn-row {
    position:relative;
    display:flex;
    align-items:center;
    gap:12px;
    border:1px solid var(--nxe-border);
    border-radius:12px;
    background:var(--nxe-surface);
    padding:8px;
    margin-bottom:16px;
    transition:all 0.15s ease;
    color:inherit;
    text-decoration:none;
}

.nxe .nxe-conn-namerow {
    display:flex;
    align-items:center;
    gap:8px;
    min-width:0;
}

.nxe .nxe-conn-about {
    flex-shrink:0;
    color:var(--nxe-muted);
    cursor:pointer;
    display:inline-flex;
}

.nxe .nxe-conn-icon {
    flex:0 0 34px;
    width:34px;
    height:34px;
    border-radius:11px;
    background:var(--nxe-accent);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
}

.nxe .nxe-conn-body {
    flex:1;
    min-width:0;
}

.nxe .nxe-conn-name {
    font-weight:700;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.nxe .nxe-conn-dead {
    color:#dc3545;
}

.nxe .nxe-conn-dead .nxe-dot {
    background:#dc3545;
}

.nxe .nxe-conn-stale {
    color:#ffc107;
}

.nxe .nxe-conn-stale .nxe-dot {
    background:#ffc107;
}

.nxe .nxe-conn-status {
    display:inline-flex;
    align-items:center;
    gap:5px;
    white-space:nowrap;
    font-size:0.8rem;
    flex-shrink:0;
}

.nxe .nxe-conn-live {
    color:#28a745;
}

.nxe .nxe-conn-live .nxe-dot {
    background:#28a745;
}

.nxe .nxe-conn-link {
    color:inherit;
    text-decoration:none;
}

.nxe .nxe-conn-link:hover {
    color:var(--nxe-accent);
}

.nxe .nxe-conn-x {
    position:absolute;
    top:6px;
    right:8px;
    color:var(--nxe-muted);
    cursor:pointer;
    opacity:0;
    transition:opacity 0.15s ease;
    display:flex;
}

.nxe .nxe-conn-row:hover .nxe-conn-x {
    opacity:1;
}

.nxe .nxe-conn-x:hover {
    color:#d1495b;
}

.nxe .nxe-conn-head {
    display:flex;
    align-items:center;
    justify-content:space-between;
    min-height:36px;
    margin-bottom:16px;
}

/* The toggle is out of flow, so it and the lock are both pinned to a fixed size and to the
   centre of the 36px header row. Guessing at the chip's natural size left them misaligned. */
.nxe .nxe-conn-head .nxe-chip,
.nxe .nxe-collapse {
    width:38px;
    height:32px;
    padding:0;
    justify-content:center;
}

/* Below nxe-lg the panel is an overlay opened from the bar, so there is nothing to collapse. */
.nxe .nxe-collapse {
    display:none;
}

.nxe.nxe-lg .nxe-conn-head {
    padding-right:48px;
}

.nxe.nxe-lg .nxe-collapse {
    display:inline-flex;
    position:absolute;
    top:18px;
    right:15px;
    transform:translateY(-50%);
    z-index:2;
}

.nxe .nxe-chip {
    display:inline-flex;
    align-items:center;
    gap:6px;
    background:var(--nxe-surface);
    border:1px solid var(--nxe-border);
    border-radius:999px;
    padding:6px 14px;
    color:var(--nxe-muted);
    font:inherit;
    font-size:0.82rem;
    cursor:pointer;
    flex:0 0 auto;
    transition:color 0.15s ease,border-color 0.15s ease;
}

.nxe .nxe-chip:not(:disabled):hover {
    color:var(--nxe-text);
    border-color:var(--nxe-accent);
}

.nxe .nxe-chip:disabled {
    opacity:0.5;
    cursor:default;
}

.nxe .nxe-add-slot {
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-height:54px;
    padding:8px;
    margin-bottom:16px;
    border:1px dashed var(--nxe-border);
    border-radius:12px;
    background:var(--nxe-surface);
    color:var(--nxe-muted);
    font-size:0.9rem;
    text-align:center;
    cursor:pointer;
    transition:all 0.15s ease;
}

.nxe .nxe-add-slot:hover {
    border-color:var(--nxe-accent);
}

.nxe .nxe-modal-xl {
    max-width:1140px;
}

.nxe .nxe-lib-grid {
    display:flex;
    flex-wrap:wrap;
    margin-left:-8px;
    margin-right:-8px;
}

.nxe .nxe-lib-col {
    width:100%;
    padding:0 8px;
    margin-bottom:16px;
}

.nxe.nxe-md .nxe-lib-col {
    width:50%;
}

.nxe.nxe-lg .nxe-lib-col {
    width:33.333333%;
}

.nxe .nxe-tool-card {
    position:relative;
    display:flex;
    flex-direction:column;
    height:100%;
    border:1px solid var(--nxe-border);
    border-radius:14px;
    padding:16px;
    transition:all 0.15s ease;
}

.nxe .nxe-tool-added {
    background:var(--nxe-surface);
    pointer-events:none;
}

.nxe .nxe-tool-added .nxe-tool-head,
.nxe .nxe-tool-added .nxe-tool-line {
    opacity:0.55;
}

.nxe .nxe-tool-head {
    display:flex;
    align-items:center;
    gap:8px;
    margin-bottom:8px;
}

.nxe .nxe-tool-name {
    font-weight:700;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    min-width:0;
}

.nxe .nxe-tool-globe {
    color:var(--nxe-muted);
    flex-shrink:0;
    display:inline-flex;
}

.nxe .nxe-tool-line {
    color:var(--nxe-muted);
    font-size:0.875em;
    margin-bottom:8px;
}

.nxe .nxe-tool-line i {
    margin-right:4px;
}

.nxe .nxe-tool-more {
    color:var(--nxe-accent);
    text-decoration:none;
}

.nxe .nxe-tool-add {
    align-self:flex-start;
    margin-top:auto;
}

.nxe .nxe-pick-custom {
    border-style:dashed;
    cursor:pointer;
}

.nxe .nxe-pick-custom:hover {
    border-color:var(--nxe-accent);
    background:rgba(124,92,255,0.07);
    transform:translateY(-2px);
}

.nxe .nxe-icon-gradient {
    background:linear-gradient(120deg,var(--nxe-accent),var(--nxe-accent-2));
}

.nxe .nxe-lib-empty {
    color:var(--nxe-muted);
    text-align:center;
    padding:16px 0;
}

.nxe .nxe-lib-search {
    display:block;
    width:100%;
    margin-bottom:14px;
    background:var(--nxe-bg);
    border:1px solid var(--nxe-border);
    border-radius:8px;
    padding:8px 11px;
    color:var(--nxe-text);
    font:inherit;
    font-size:0.88rem;
}

.nxe .nxe-lib-search:focus {
    outline:none;
    border-color:var(--nxe-accent);
}

.nxe .nxe-tools {
    margin-bottom:12px;
}

.nxe .nxe-tool {
    display:inline-flex;
    align-items:center;
    gap:7px;
    background:var(--nxe-surface);
    border:1px solid var(--nxe-border);
    border-radius:999px;
    padding:4px 12px;
    font-size:0.82rem;
    color:var(--nxe-muted);
}

.nxe .nxe-tool-on {
    color:var(--nxe-text);
}

.nxe .nxe-dot {
    width:7px;
    height:7px;
    border-radius:50%;
    background:var(--nxe-border);
    flex:0 0 7px;
}

.nxe .nxe-tool-on .nxe-dot {
    background:#2f7a5b;
}

.nxe .nxe-tasks {
    display:none;
    margin-top:24px;
}

.nxe .nxe-task {
    display:flex;
    align-items:flex-start;
    gap:8px;
    padding:3px 0;
    font-size:0.9rem;
}

.nxe .nxe-task-box {
    flex:0 0 14px;
    height:14px;
    margin-top:4px;
    border:1px solid var(--nxe-border);
    border-radius:4px;
    display:flex;
    align-items:center;
    justify-content:center;
}

.nxe .nxe-task-done {
    color:var(--nxe-muted);
    text-decoration:line-through;
}

.nxe .nxe-task-done .nxe-task-box {
    border-color:#2f7a5b;
}

.nxe .nxe-knowledge {
    margin-top:24px;
}

.nxe .nxe-file-row {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    padding:3px 0;
    font-size:0.85rem;
    cursor:pointer;
}

.nxe .nxe-file-name {
    display:flex;
    align-items:center;
    gap:8px;
    min-width:0;
    overflow:hidden;
}

.nxe .nxe-file-name svg {
    flex:0 0 13px;
    color:var(--nxe-muted);
}

.nxe .nxe-file-name span {
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.nxe .nxe-file-row:hover .nxe-file-name {
    color:var(--nxe-accent);
}

.nxe .nxe-file-x {
    flex:0 0 auto;
    background:none;
    border:none;
    padding:0;
    color:#d1495b;
    cursor:pointer;
    display:flex;
}

.nxe .nxe-file-edit {
    min-height:60vh;
    font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
    font-size:0.85rem;
    resize:none;
}

.nxe .nxe-quote {
    margin:8px 0;
    padding:2px 0 2px 12px;
    border-left:3px solid var(--nxe-border);
    color:var(--nxe-text);
}

.nxe .nxe-file-typerow {
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:10px;
}

.nxe .nxe-file-typerow .nxe-section-label {
    margin-bottom:0;
}

.nxe .nxe-file-type {
    appearance:none;
    -webkit-appearance:none;
    padding:7px 30px 7px 12px;
    background-color:var(--nxe-bg);
    background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236a6f86' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M4 6.5 8 10.5 12 6.5'/%3E%3C/svg%3E");
    background-repeat:no-repeat;
    background-position:right 9px center;
    background-size:13px;
    border:1px solid var(--nxe-border);
    border-radius:10px;
    color:var(--nxe-text);
    font:inherit;
    font-size:0.85rem;
    line-height:1.2;
    cursor:pointer;
}

.nxe .nxe-file-type:hover {
    background-color:var(--nxe-surface2);
}

.nxe .nxe-file-type:focus {
    outline:none;
    border-color:var(--nxe-accent);
}

.nxe .nxe-file-status {
    margin-top:8px;
    color:var(--nxe-muted);
    font-size:0.8rem;
}

.nxe .nxe-file-add {
    width:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    margin-top:8px;
}

.nxe .nxe-thread {
    flex:1;
    min-height:0;
    max-height:75vh;
    overflow-y:auto;
    display:flex;
    flex-direction:column;
    padding-bottom:16px;
}

.nxe.nxe-md .nxe-thread {
    padding-right:48px;
}

.nxe .nxe-empty {
    flex:1;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;
    color:var(--nxe-muted);
    font-size:0.9rem;
    opacity:0.7;
    padding:16px;
}

.nxe .nxe-empty svg {
    margin-bottom:8px;
}

.nxe .nxe-suggests {
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:8px;
    margin-top:12px;
}

.nxe .nxe-suggests .nxe-chip {
    flex:0 1 auto;
}

.nxe .nxe-user {
    display:flex;
    justify-content:flex-end;
    margin-bottom:8px;
}

.nxe .nxe-user-atts {
    display:flex;
    flex-wrap:wrap;
    justify-content:flex-end;
    gap:6px;
    margin-bottom:6px;
}

.nxe .nxe-user {
    flex-direction:column;
    align-items:flex-end;
}

.nxe .nxe-user>div {
    background:var(--nxe-surface2);
    border-radius:16px;
    padding:8px 14px;
    max-width:85%;
    white-space:pre-wrap;
    overflow-wrap:anywhere;
}

.nxe .nxe-user.nxe-unsent {
    opacity:0.5;
}

.nxe .nxe-agent {
    margin-bottom:24px;
}

.nxe .nxe-step {
    display:flex;
    align-items:center;
    color:var(--nxe-muted);
    font-size:0.9rem;
    margin-bottom:4px;
}

.nxe .nxe-step i {
    margin-right:8px;
}

.nxe .nxe-spin {
    animation:nxe-spin 1s linear infinite;
    transform-origin:center;
}

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

.nxe .nxe-toggle {
    margin-left:8px;
    font-size:0.8rem;
    color:var(--nxe-muted);
    cursor:pointer;
    text-decoration:underline;
}

.nxe .nxe-think {
    opacity:0.65;
    font-size:0.9rem;
    color:var(--nxe-muted);
    white-space:pre-wrap;
    margin-bottom:8px;
    border-left:2px solid var(--nxe-border);
    padding-left:10px;
    max-height:20rem;
    overflow-y:auto;
}

.nxe .nxe-reply {
    overflow-wrap:anywhere;
}

.nxe .nxe-reply>div {
    margin-bottom:8px;
}

.nxe .nxe-reply ul,
.nxe .nxe-reply ol {
    margin:0 0 8px;
    padding-left:1.2rem;
}

.nxe .nxe-reply pre {
    background:var(--nxe-surface2);
    padding:10px 12px;
    border-radius:8px;
    overflow:auto;
    margin:0 0 8px;
}

.nxe .nxe-reply code {
    background:var(--nxe-surface2);
    padding:1px 5px;
    border-radius:4px;
}

.nxe .nxe-reply pre code {
    background:none;
    padding:0;
}

.nxe .nxe-reply table {
    border-collapse:collapse;
    margin-bottom:8px;
}

.nxe .nxe-reply th {
    text-align:left;
    padding:4px 8px;
    border-bottom:1px solid var(--nxe-border);
}

.nxe .nxe-reply td {
    border-top:1px solid var(--nxe-border);
    padding:4px 8px;
}

.nxe .nxe-reply a {
    color:var(--nxe-accent);
}

.nxe .nxe-reply hr {
    border:0;
    border-top:1px solid var(--nxe-border);
    margin:10px 0;
}

.nxe .nxe-err {
    color:#d1495b;
}

.nxe .nxe-media {
    max-width:min(320px,100%);
    border-radius:10px;
    display:block;
    margin:4px 0;
}

.nxe .nxe-canvas-wrap {
    position:relative;
    background:var(--nxe-surface-solid);
}

.nxe .nxe-canvas {
    display:block;
    width:100%;
    height:420px;
    margin:8px 0;
    border:1px solid var(--nxe-border);
    border-radius:10px;
    background:var(--nxe-surface-solid);
}

.nxe .nxe-canvas-max,
.nxe .nxe-canvas-win {
    position:absolute;
    top:16px;
    right:8px;
    width:32px;
    height:32px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:var(--nxe-surface-solid);
    border:1px solid var(--nxe-border);
    border-radius:8px;
    color:var(--nxe-muted);
    font-size:0.8rem;
    cursor:pointer;
    opacity:0;
    transition:opacity 0.15s ease,color 0.15s ease;
}

.nxe .nxe-canvas-win {
    right:48px;
}

.nxe .nxe-canvas-wrap:hover .nxe-canvas-max,
.nxe .nxe-canvas-wrap:hover .nxe-canvas-win,
.nxe .nxe-canvas-max:focus,
.nxe .nxe-canvas-win:focus {
    opacity:1;
}

.nxe .nxe-canvas-max:hover,
.nxe .nxe-canvas-win:hover {
    color:var(--nxe-text);
}

.nxe .nxe-canvas-wrap.nxe-canvas-filled {
    position:fixed;
    top:0;
    right:0;
    bottom:0;
    left:0;
    z-index:2147482000;
}

.nxe .nxe-canvas-filled .nxe-canvas {
    height:100%;
    margin:0;
    border:none;
    border-radius:0;
}

.nxe .nxe-canvas-filled .nxe-canvas-max,
.nxe .nxe-canvas-filled .nxe-canvas-win {
    top:8px;
    opacity:1;
}

.nxe .nxe-canvas-wrap:fullscreen .nxe-canvas {
    height:100%;
    margin:0;
    border:none;
    border-radius:0;
}

.nxe .nxe-canvas-wrap:fullscreen .nxe-canvas-max,
.nxe .nxe-canvas-wrap:fullscreen .nxe-canvas-win {
    top:8px;
    opacity:1;
}

.nxe .nxe-notice {
    font-size:0.9rem;
    color:#b8860b;
    margin-top:8px;
}

.nxe .nxe-files {
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    margin-top:8px;
}

.nxe .nxe-files img,
.nxe .nxe-files video {
    max-width:min(320px,100%);
    border-radius:10px;
    display:block;
}

.nxe .nxe-file {
    display:inline-flex;
    align-items:center;
    gap:7px;
    background:var(--nxe-surface2);
    border:1px solid var(--nxe-border);
    border-radius:10px;
    padding:5px 9px;
    font-size:0.82rem;
    color:var(--nxe-text);
    text-decoration:none;
}

.nxe .nxe-atts {
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    margin-bottom:6px;
}

.nxe .nxe-att {
    display:inline-flex;
    align-items:center;
    gap:7px;
    background:var(--nxe-surface2);
    border:1px solid var(--nxe-border);
    border-radius:10px;
    padding:5px 9px;
    font-size:0.82rem;
    max-width:220px;
}

.nxe .nxe-att-kind {
    display:inline-flex;
    color:var(--nxe-muted);
    flex-shrink:0;
}

.nxe .nxe-att-up {
    opacity:0.6;
}

.nxe .nxe-att span {
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.nxe .nxe-att button {
    background:none;
    border:none;
    padding:0;
    color:var(--nxe-muted);
    cursor:pointer;
    display:flex;
}

.nxe .nxe-att button:hover {
    color:var(--nxe-text);
}

.nxe .nxe-attach {
    flex:0 0 auto;
    width:36px;
    height:36px;
    border:1px solid var(--nxe-border);
    border-radius:12px;
    background:var(--nxe-surface);
    color:var(--nxe-muted);
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
}

.nxe .nxe-attach:hover {
    color:var(--nxe-text);
    border-color:var(--nxe-accent);
}

.nxe .nxe-mic {
    flex:0 0 auto;
    width:36px;
    height:36px;
    border:1px solid var(--nxe-border);
    border-radius:12px;
    background:var(--nxe-surface);
    color:var(--nxe-muted);
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
}

.nxe .nxe-mic:hover {
    color:var(--nxe-text);
    border-color:var(--nxe-accent);
}

.nxe .nxe-mic-live {
    background:linear-gradient(120deg, var(--nxe-accent), #9d7bff);
    border-color:transparent;
    color:#fff;
    animation:nxe-pulse 1.3s ease-in-out infinite;
}

.nxe .nxe-mic-live:hover {
    color:#fff;
}

@keyframes nxe-pulse {50%{opacity:0.5;}}

.nxe .nxe-drop {
    outline:2px dashed var(--nxe-accent);
    outline-offset:4px;
}

.nxe .nxe-drop .nxe-dropveil {
    display:flex;
}

.nxe .nxe-dropveil {
    position:absolute;
    inset:0;
    z-index:60;
    display:none;
    align-items:center;
    justify-content:center;
    background:rgba(20,22,45,0.55);
    pointer-events:none;
}

.nxe .nxe-dropveil>div {
    background:var(--nxe-surface);
    border:2px dashed var(--nxe-accent);
    border-radius:16px;
    padding:18px 40px;
    text-align:center;
    font-weight:600;
}

.nxe .nxe-dropveil small {
    display:block;
    font-weight:400;
    color:var(--nxe-muted);
}

.nxe .nxe-inputrow {
    display:flex;
    align-items:flex-end;
    gap:12px;
}

.nxe .nxe-inputbar {
    flex:1;
    min-width:0;
    display:flex;
    align-items:flex-end;
    gap:6px;
    background:var(--nxe-surface2);
    border:1px solid var(--nxe-border);
    border-radius:18px;
    padding:8px 8px 8px 14px;
    box-shadow:0 12px 40px rgba(20,22,45,0.10);
    transition:border-color 0.2s ease, box-shadow 0.2s ease;
}

.nxe.nxe-sm .nxe-inputbar {
    gap:8px;
    margin-top:12px;
    padding:10px 10px 10px 22px;
}

.nxe .nxe-inputbar:focus-within {
    border-color:var(--nxe-accent);
    box-shadow:0 0 0 4px rgba(124,92,255,0.16), 0 12px 40px rgba(20,22,45,0.10);
}

.nxe .nxe-input {
    flex:1;
    min-width:0;
    background:transparent;
    border:none;
    outline:none;
    resize:none;
    overflow-y:auto;
    max-height:40vh;
    color:var(--nxe-text);
    font:inherit;
    line-height:1.5;
    padding:8px 0;
}

.nxe .nxe-input::placeholder {
    color:var(--nxe-muted);
}

.nxe .nxe-send {
    flex:0 0 auto;
    width:36px;
    height:36px;
    border:none;
    border-radius:12px;
    background:linear-gradient(120deg, var(--nxe-accent), #9d7bff);
    color:#fff;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:transform 0.15s ease, filter 0.15s ease;
}

.nxe.nxe-sm .nxe-attach,
.nxe.nxe-sm .nxe-mic,
.nxe.nxe-sm .nxe-send {
    width:40px;
    height:40px;
}

.nxe .nxe-send:not(:disabled):hover {
    transform:translateY(-1px);
    filter:brightness(1.08);
}

.nxe .nxe-send:disabled {
    opacity:0.5;
    cursor:default;
}

.nxe .nxe-panels-btn {
    flex:0 0 auto;
}


.nxe .nxe-side {
    display:none;
}

.nxe:not(.nxe-lg).nxe-side-open .nxe-side {
    display:flex;
    flex-direction:column;
    position:absolute;
    z-index:30;
    top:0;
    right:0;
    bottom:0;
    width:min(20rem, 85%);
    margin:0;
    padding:8px;
    border:1px solid var(--nxe-border);
    border-radius:10px;
    background:var(--nxe-surface-solid);
    box-shadow:0 8px 24px rgba(20,22,45,0.14);
    overflow:hidden;
}

.nxe:not(.nxe-lg).nxe-side-open .nxe-sidescroll {
    flex:1;
    min-height:0;
    max-height:none;
    padding-bottom:0;
}

.nxe .nxe-bar .nxe-section-label {
    display:none;
}

.nxe.nxe-lg .nxe-panels-btn {
    display:none;
}

.nxe.nxe-lg.nxe-side-hidden .nxe-sidescroll {
    display:none;
}

.nxe.nxe-lg.nxe-side-hidden .nxe-side {
    width:0;
    min-width:0;
    padding:0;
}

.nxe.nxe-lg.nxe-side-hidden .nxe-bar {
    padding-right:48px;
}

.nxe.nxe-lg .nxe-hist {
    margin-left:auto;
}

.nxe.nxe-lg .nxe-hist-menu {
    left:auto;
    right:0;
}

.nxe.nxe-lg .nxe-side,
.nxe.nxe-lg.nxe-side-open .nxe-side {
    display:block;
    margin-bottom:0;
    padding:0 15px;
    border:none;
    border-radius:0;
    background:none;
    box-shadow:none;
    max-height:none;
    overflow:visible;
}

.nxe.nxe-lg .nxe-bar .nxe-section-label {
    display:block;
}

.nxe.nxe-lg:not(.nxe-xl) .nxe-side .nxe-section-label:not(.nxe-conn-head),
.nxe.nxe-lg:not(.nxe-xl) .nxe-side .nxe-btn-text {
    display:none;
}

.nxe .nxe-cost {
    margin-top:4px;
    font-size:0.8rem;
    color:var(--nxe-muted);
}

.nxe .nxe-sidescroll>.nxe-side-section:first-child {
    margin-top:0;
}

.nxe.nxe-lg .nxe-sidescroll>.nxe-side-section:first-child>.nxe-section-label {
    display:flex;
    align-items:center;
    min-height:36px;
    margin-bottom:16px;
    padding-right:48px;
}
