/* FLUX Control — people-side sections: Dashboard, People, Chats, Support, Invites, Notify. Every class uses the ncp- prefix. */
:root, [data-theme="dark"] {
  --ncp-warn: #fbbf24;
  --ncp-warn-soft: rgba(251, 191, 36, .14);
  --ncp-ok-soft: rgba(74, 222, 128, .13);
  --ncp-reason: #7fdcff;
  --ncp-row: rgba(120, 170, 255, .045);
  --ncp-mark: rgba(250, 204, 21, .32);
}
[data-theme="light"] {
  --ncp-warn: #b45309;
  --ncp-warn-soft: rgba(217, 119, 6, .12);
  --ncp-ok-soft: rgba(22, 163, 74, .1);
  --ncp-reason: #0369a1;
  --ncp-row: rgba(20, 60, 140, .035);
  --ncp-mark: rgba(250, 204, 21, .55);
}

/* ---------- shared ---------- */
[class*="ncp-"][hidden] { display: none !important; }
.ncp-ic { display: inline-flex; width: 16px; height: 16px; flex: none; }
.ncp-ic svg { width: 100%; height: 100%; }
.ncp-dimtxt { color: var(--dim); }
.ncp-hint { color: var(--dim); font-size: 12.5px; line-height: 1.45; margin: 0; font-weight: 400; }
.ncp-center { text-align: center; }
.ncp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ncp-chips { display: inline-flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.ncp-slot:empty { display: none; }
.ncp-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ncp-num { width: 110px; }
.ncp-card-title { display: flex; align-items: center; gap: 6px 8px; width: 100%; min-width: 0; flex-wrap: wrap; }
.ncp-card-title h3 { flex: 1 1 auto; min-width: 0; }
.ncp-card-title small { font-size: 12px; }
.ncp-foot { margin: 12px 0 0; font-size: 12.5px; color: var(--dim); line-height: 1.45; }
.ncp-click { cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; }
.ncp-click:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -20px rgba(30, 144, 255, .7); }
.nc-meter.ncp-click { border-radius: 9px; padding: 5px 7px; margin: -5px -7px; }
.nc-meter.ncp-click:hover { background: var(--hover); transform: none; box-shadow: none; }
.ncp-danger-txt { color: var(--danger); font-family: 'JetBrains Mono', ui-monospace, monospace; }
.ncp-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.ncp-danger:hover:not(:disabled) { background: var(--danger); color: #fff; border-color: transparent; }

/* avatars */
.ncp-avwrap { position: relative; display: inline-flex; flex: none; }
.ncp-live { position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); border: 2px solid var(--bg); }
.nc-avatar.lg + .ncp-live { width: 12px; height: 12px; right: 1px; bottom: 1px; }

/* progress bar */
.ncp-bar { display: block; height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; min-width: 40px; }
.ncp-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--grad); transition: width .4s cubic-bezier(.2, .8, .2, 1); }
.ncp-bar.warn > span { background: var(--ncp-warn); }
.ncp-bar.bad > span { background: var(--danger); }
.ncp-bar.good > span { background: var(--ok); }

/* segmented control */
.ncp-seg { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); max-width: 100%; box-sizing: border-box; }
.ncp-seg-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 5px 12px; border: 0; border-radius: 9px; background: none; color: var(--muted);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s;
}
.ncp-seg-btn:hover { color: var(--text); background: var(--hover); }
.ncp-seg-btn[aria-checked="true"] { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.ncp-seg-n { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-variant-numeric: tabular-nums; }
.ncp-seg-btn[aria-checked="true"] .ncp-seg-n { background: rgba(255, 255, 255, .24); color: #fff; }

.ncp-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ncp-toolbar .nc-search { min-width: 180px; }

/* ================= dashboard ================= */
.ncp-dash { display: flex; flex-direction: column; gap: 18px; }
.ncp-quiet .nc-bars rect, .ncp-quiet .nc-meter-fill, .ncp-quiet .ncp-bar > span { animation: none !important; transition: none !important; }

.ncp-hero {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 18px 22px; flex-wrap: wrap;
  padding: 22px 26px; border-radius: 20px; border: 1px solid transparent;
  background:
    radial-gradient(640px 240px at 0% 0%, rgba(79, 210, 255, .16), transparent 60%) padding-box,
    radial-gradient(560px 260px at 100% 110%, rgba(10, 60, 255, .26), transparent 62%) padding-box,
    linear-gradient(var(--glass-strong, var(--surface)), var(--glass-strong, var(--surface))) padding-box,
    var(--neon, var(--border)) border-box;
  box-shadow: 0 24px 60px -36px rgba(30, 144, 255, .7);
}
.ncp-hero::after {
  content: ''; position: absolute; right: -80px; top: -120px; width: 320px; height: 320px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 90deg, transparent, rgba(79, 210, 255, .24), rgba(30, 144, 255, .2), rgba(10, 60, 255, .3), transparent 75%);
  filter: blur(34px); animation: ncpSpin 18s linear infinite;
}
@keyframes ncpSpin { to { transform: rotate(360deg); } }
.ncp-hero-text { position: relative; z-index: 1; min-width: 0; flex: 1 1 320px; }
.ncp-hero h2 { margin: 10px 0 4px; font-family: var(--nc-title, 'Exo 2', Inter, sans-serif); font-size: 31px; font-weight: 700; letter-spacing: -.005em; line-height: 1.15; }
/* the big 3D logo (fx.js draws its own halo, rings and sparks) */
.ncp-hero-orbit { position: relative; z-index: 1; flex: none; width: 124px; height: 124px; display: grid; place-items: center; margin: 4px 6px; }
.ncp-hero-logo { position: relative; display: block; width: 100%; height: 100%; }
.ncp-hero-logo > * { max-width: 100%; max-height: 100%; }
.ncp-hero-logo > svg, .ncp-hero-logo > canvas, .ncp-hero-logo > img { width: 100%; height: 100%; }
.ncp-hero-top { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.ncp-eyebrow { display: inline-flex; align-items: baseline; gap: 7px; font-family: var(--nc-display, 'Orbitron', sans-serif); font-size: 13px; font-weight: 800; letter-spacing: .12em; white-space: nowrap; }
.ncp-eyebrow .flux-wordmark { font-size: inherit; }
.ncp-eyebrow-ctl { color: var(--nc-cyan, #4fd2ff); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }
[data-theme="light"] .ncp-eyebrow-ctl { color: var(--accent); }

.ncp-hero p { margin: 0; color: var(--muted); font-size: 14.5px; }
.ncp-hero-actions { position: relative; z-index: 1; display: flex; gap: 10px; flex-wrap: wrap; }
.ncp-livebadge {
  display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px 0 9px; border-radius: 999px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); background: var(--ncp-ok-soft); color: var(--ok); font: inherit; font-size: 12px;
}
.ncp-livebadge b { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 10.5px; }
.ncp-livebadge span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.ncp-pulse, .ncp-livedot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; animation: ncpPing 1.8s ease-out infinite; }
.ncp-livedot { width: 9px; height: 9px; }
.ncp-loading .ncp-pulse { animation-duration: .5s; }
@keyframes ncpPing { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); } 80%, 100% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); } }

.ncp-alert { display: flex; align-items: center; gap: 12px; padding: 11px 12px 11px 14px; border-radius: 14px; border: 1px solid; font-size: 14px; flex-wrap: wrap; }
.ncp-alert.bad { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.ncp-alert.warn { background: var(--ncp-warn-soft); border-color: color-mix(in srgb, var(--ncp-warn) 35%, transparent); }
.ncp-alert-ic { font-size: 18px; }
.ncp-alert-text { flex: 1; min-width: 180px; font-weight: 600; }

/* status strip */
.ncp-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.ncp-status {
  position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 11px 12px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--glass, var(--surface)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--text); font: inherit; text-align: left; cursor: pointer;
  transition: border-color .15s, transform .15s, background .15s;
}
.ncp-status:hover { border-color: var(--border-strong); background: var(--hover); transform: translateY(-1px); }
.ncp-status-ic { width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--surface-2); color: var(--muted); }
.ncp-status-txt { display: flex; flex-direction: column; min-width: 0; }
.ncp-status-txt small { font-size: 10.5px; color: var(--dim); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ncp-status-txt b { font-size: 14.5px; font-weight: 750; }
.ncp-status-dot { position: absolute; top: 9px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.ncp-status.ok .ncp-status-ic { color: var(--ok); background: var(--ncp-ok-soft); }
.ncp-status.ok .ncp-status-dot { background: var(--ok); }
.ncp-status.accent .ncp-status-ic { color: var(--accent); background: var(--accent-soft); }
.ncp-status.accent .ncp-status-dot { background: var(--accent); }
.ncp-status.warn .ncp-status-ic { color: var(--ncp-warn); background: var(--ncp-warn-soft); }
.ncp-status.warn .ncp-status-dot { background: var(--ncp-warn); }
.ncp-status.warn b { color: var(--ncp-warn); }
.ncp-status.bad { border-color: color-mix(in srgb, var(--danger) 50%, transparent); background: var(--danger-soft); }
.ncp-status.bad .ncp-status-ic { color: #fff; background: var(--danger); }
.ncp-status.bad .ncp-status-dot { background: var(--danger); animation: ncPulse 1.6s ease-in-out infinite; }
.ncp-status.bad b { color: var(--danger); }
.ncp-status.idle b { color: var(--muted); }

/* stat cards */
.ncp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ncp-stats .nc-stat { min-width: 0; }
.ncp-stats .nc-stat-sub { min-height: 24px; display: flex; align-items: center; }
.ncp-stack { display: inline-flex; align-items: center; padding-left: 7px; }
.ncp-stack .nc-avatar { width: 24px; height: 24px; font-size: 11px; margin-left: -7px; box-shadow: 0 0 0 2px var(--bg); }
.ncp-stack-more { margin-left: 6px; font-size: 12px; color: var(--muted); font-weight: 700; }

.ncp-split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ncp-three { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; align-items: start; }

/* chart */
.ncp-chart .nc-bars { height: 180px; }
.ncp-chart .ncp-sw { fill: var(--ncp-warn); }
.ncp-chart .ncp-bl { fill: var(--danger); }
.ncp-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.ncp-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.ncp-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.ncp-legend i.msg { background: linear-gradient(0deg, #0a3cff, #1e90ff 55%, #4fd2ff); }
.ncp-legend i.sw { background: var(--ncp-warn); }
.ncp-legend i.bl { background: var(--danger); }

/* list rows that are buttons */
.ncp-rowbtn { width: 100%; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
.ncp-rowbtn .nc-item-title, .ncp-rowbtn .nc-item-sub { display: block; }
.ncp-go { color: var(--dim); display: inline-flex; }
.ncp-rowbtn:hover .ncp-go { color: var(--accent); }
.ncp-online { max-height: 340px; overflow-y: auto; }

/* activity feed */
.ncp-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ncp-feed-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.ncp-feed-row + .ncp-feed-row { border-top: 1px solid var(--border); }
.ncp-feed-ic { width: 32px; height: 32px; border-radius: 10px; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; font-size: 15px; flex: none; }
.ncp-feed-row.good .ncp-feed-ic { background: var(--ncp-ok-soft); }
.ncp-feed-row.bad .ncp-feed-ic { background: var(--danger-soft); }
.ncp-feed-row.warn .ncp-feed-ic { background: var(--ncp-warn-soft); }
.ncp-feed-row.admin .ncp-feed-ic { background: var(--accent-soft); }
.ncp-feed-main { min-width: 0; flex: 1; }
.ncp-feed-text { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.ncp-feed-sub { font-size: 12.5px; color: var(--dim); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* cooling models */
.ncp-cool-ic { font-size: 20px; width: 32px; text-align: center; flex: none; }
.ncp-countdown { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 12.5px; color: var(--ncp-warn); background: var(--ncp-warn-soft); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.ncp-done .ncp-countdown { color: var(--ok); background: var(--ncp-ok-soft); }
.ncp-allgood { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: var(--ncp-ok-soft); }
.ncp-allgood-ic { width: 34px; height: 34px; border-radius: 50%; background: var(--ok); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ncp-allgood-ic .ncp-ic { width: 18px; height: 18px; }
.ncp-allgood b { display: block; font-size: 14px; }
.ncp-allgood small { color: var(--muted); font-size: 12.5px; }

/* ================= people ================= */
.ncp-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 14px; font-size: 14px;
  background: linear-gradient(90deg, rgba(30, 144, 255, .16), rgba(79, 210, 255, .08)); border: 1px solid rgba(79, 170, 255, .32);
}
.ncp-banner-ic { width: 28px; height: 28px; border-radius: 8px; background: var(--grad); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ncp-banner > span:nth-child(2) { flex: 1; min-width: 200px; }
.ncp-sort { width: auto; min-width: 160px; flex: none; }
.ncp-toolbar2 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0 8px; }
.ncp-count { color: var(--dim); font-size: 13px; margin-left: auto; }

.ncp-person { display: flex; align-items: center; gap: 11px; min-width: 0; }
.ncp-person-main { min-width: 0; }
.ncp-person-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ncp-plink { border: 0; background: none; padding: 0; font: inherit; font-weight: 650; font-size: 14.5px; color: var(--text); cursor: pointer; text-align: left; overflow-wrap: anywhere; }
.ncp-plink:hover { color: var(--accent); }
.ncp-person-sub { font-size: 12.5px; color: var(--dim); }
.ncp-model { font-weight: 600; font-size: 13px; }
.ncp-usage { display: flex; flex-direction: column; gap: 4px; min-width: 84px; }
.ncp-usage-n { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ncp-usage-n b { color: var(--text); }
.ncp-seen { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.ncp-td-go { width: 24px; color: var(--dim); text-align: right; }
.ncp-ptable tbody tr.click:hover .ncp-td-go { color: var(--accent); }
.ncp-ptable tbody tr.click:focus-within { background: var(--hover); }
.ncp-td-person { min-width: 180px; }
.ncp-model { display: inline-block; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }

/* The table turns into card rows when its card is narrow (phones, tablets, small laptops). */
.ncp-people { container: ncp-people / inline-size; }
@container ncp-people (max-width: 700px) {
  .ncp-ptable-wrap { overflow: visible; margin: 0; }
  .ncp-ptable thead { display: none; }
  .ncp-ptable, .ncp-ptable tbody { display: block; }
  .ncp-ptable tbody tr {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 12px; padding: 13px; margin-bottom: 10px;
    border: 1px solid var(--border); border-radius: 14px; background: var(--ncp-row);
  }
  .ncp-ptable tbody tr:last-child { margin-bottom: 0; }
  .ncp-ptable td { display: block; padding: 0; border: 0; min-width: 0; }
  .ncp-ptable td.ncp-td-person { grid-column: 1 / -1; min-width: 0; }
  .ncp-ptable td[data-label]::before { content: attr(data-label); display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); margin-bottom: 5px; }
  .ncp-ptable td.ncp-td-go { display: none; }
  .ncp-usage { min-width: 0; }
  .ncp-model { max-width: 100%; }
  .ncp-seen { white-space: normal; }
}

/* person drawer */
.ncp-phead {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px; border-radius: 16px; border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(79, 210, 255, .08), rgba(10, 60, 255, .1));
}
.ncp-phead-main { flex: 1; min-width: 190px; display: flex; flex-direction: column; gap: 6px; }
.ncp-phead-sub { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.ncp-phead-usage { min-width: 110px; display: flex; flex-direction: column; gap: 4px; }
.ncp-phead-usage > small { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--dim); }
.ncp-sets { display: flex; flex-direction: column; gap: 16px; }
.ncp-set { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ncp-set-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.ncp-set-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ncp-details { border: 1px solid var(--border); border-radius: 12px; padding: 0 12px; background: var(--ncp-row); }
.ncp-details summary { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 11px 0; font-size: 13px; font-weight: 600; color: var(--muted); list-style: none; }
.ncp-details summary::-webkit-details-marker { display: none; }
.ncp-details summary::before { content: ''; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .2s; margin: 0 4px 0 2px; }
.ncp-details[open] summary::before { transform: rotate(45deg); }
.ncp-details summary .nc-chip { margin-left: auto; }
.ncp-details[open] { padding-bottom: 12px; }
.ncp-details > .ncp-hint { margin-bottom: 10px; }
.ncp-checks { display: flex; flex-direction: column; gap: 1px; max-height: 240px; overflow-y: auto; margin-bottom: 10px; }
.ncp-check { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 8px; font-size: 13.5px; cursor: pointer; }
.ncp-check:hover { background: var(--hover); }
.ncp-check input { width: 16px; height: 16px; accent-color: var(--accent); flex: none; margin: 0; }
.ncp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ncp-act { justify-content: flex-start; text-align: left; }
.ncp-actions + .ncp-hint { margin-top: 10px; }
.ncp-h4n { color: var(--muted); }
.ncp-devices { display: flex; flex-direction: column; gap: 8px; }
.ncp-device { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--ncp-row); transition: opacity .2s, transform .2s; }
.ncp-device.ncp-gone { opacity: 0; transform: translateX(20px); }
.ncp-device-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ncp-device-ic .ncp-ic { width: 18px; height: 18px; }
.ncp-device-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ncp-device-main b { font-size: 14px; display: flex; align-items: center; gap: 7px; }
.ncp-device-main small { font-size: 12px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ncp-tl { list-style: none; margin: 0; padding: 0; position: relative; }
.ncp-tl::before { content: ''; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 2px; background: var(--border); border-radius: 1px; }
.ncp-tl-row { display: flex; gap: 12px; padding: 6px 0; position: relative; }
.ncp-tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dim); box-shadow: 0 0 0 3px var(--bg); margin: 4px 0 0 2px; flex: none; position: relative; z-index: 1; }
.ncp-tl-row.good .ncp-tl-dot { background: var(--ok); }
.ncp-tl-row.bad .ncp-tl-dot { background: var(--danger); }
.ncp-tl-row.warn .ncp-tl-dot { background: var(--ncp-warn); }
.ncp-tl-row.accent .ncp-tl-dot { background: var(--accent); }
.ncp-tl-main { font-size: 13.5px; min-width: 0; }
.ncp-tl-main b { font-weight: 600; }
.ncp-tl-main small { display: block; color: var(--dim); font-size: 12px; margin-top: 1px; }
.ncp-more { margin-top: 6px; font-size: 13px; }
.ncp-secret { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 14px; background: var(--bg); border: 1px dashed var(--border-strong); margin-bottom: 12px; }
.ncp-secret code { flex: 1; font-size: 19px; letter-spacing: .04em; word-break: break-all; font-weight: 600; color: var(--accent); }
.ncp-typed { display: flex; flex-direction: column; gap: 14px; }
.ncp-typed > *, .ncp-typed .ncp-warnbox { margin: 0; }
.ncp-secret + .ncp-hint { margin-bottom: 10px; }
.ncp-warnbox { padding: 12px 14px; border-radius: 12px; background: var(--danger-soft); color: var(--text); font-size: 13.5px; line-height: 1.5; margin-bottom: 14px; }
.ncp-warnbox b { color: var(--danger); }

/* account tools (danger-zone card in the person drawer) */
.ncp-zone {
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 18px; border: 1px solid transparent; outline: none;
  background:
    radial-gradient(360px 200px at 100% 100%, rgba(248, 113, 113, .12), transparent 70%) padding-box,
    radial-gradient(380px 160px at 0% 0%, rgba(34, 211, 238, .09), transparent 70%) padding-box,
    linear-gradient(var(--bg), var(--bg)) padding-box,
    linear-gradient(135deg, rgba(79, 210, 255, .45), rgba(30, 144, 255, .38) 52%, rgba(248, 113, 113, .6)) border-box;
  box-shadow: 0 18px 50px -34px rgba(248, 113, 113, .55);
}
.ncp-zone[aria-busy="true"] { min-height: 120px; justify-content: center; }
.ncp-zone.locked .ncp-tgroup { opacity: .62; }
.ncp-zone-head { display: flex; align-items: center; gap: 12px; }
.ncp-zone-ic { width: 38px; height: 38px; border-radius: 12px; background: var(--grad); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; box-shadow: var(--glow); }
.ncp-zone-ic .ncp-ic { width: 19px; height: 19px; }
.ncp-zone-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ncp-zone-title b { font-size: 15px; font-weight: 750; letter-spacing: -.01em; overflow-wrap: anywhere; }
.ncp-zone-title small { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.ncp-zstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ncp-zstat { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 4px; border-radius: 11px; background: var(--ncp-row); border: 1px solid var(--border); min-width: 0; text-align: center; }
.ncp-zstat b { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; }
.ncp-zstat small { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ncp-znote {
  display: flex; align-items: flex-start; gap: 9px; margin: 0; padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.45; color: var(--text);
  background: var(--ncp-warn-soft); border: 1px solid color-mix(in srgb, var(--ncp-warn) 38%, transparent);
}
.ncp-znote > .ncp-ic { margin-top: 1px; color: var(--ncp-warn); }
.ncp-znote.lock { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.ncp-znote.lock > .ncp-ic { color: var(--accent); }
.ncp-znote .nc-link { font-size: 13px; white-space: nowrap; }
.ncp-tgroup { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; background: var(--ncp-row); overflow: hidden; }
.ncp-tgroup > h5 { display: flex; align-items: center; gap: 6px; margin: 0; padding: 9px 12px 8px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); border-bottom: 1px solid var(--border); }
.ncp-tgroup > h5 .ncp-ic { width: 13px; height: 13px; }
.ncp-tgroup.danger { border-color: color-mix(in srgb, var(--danger) 42%, transparent); background: linear-gradient(180deg, var(--danger-soft), transparent 75%), var(--ncp-row); }
.ncp-tgroup.danger > h5 { color: var(--danger); border-bottom-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.ncp-tool + .ncp-tool { border-top: 1px solid var(--border); }
.ncp-tgroup.danger .ncp-tool + .ncp-tool { border-top-color: color-mix(in srgb, var(--danger) 16%, transparent); }
.ncp-tool-row { display: flex; align-items: center; gap: 8px 11px; padding: 10px 12px; flex-wrap: wrap; }
.ncp-tool-ic { width: 32px; height: 32px; border-radius: 10px; background: var(--surface-2); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ncp-tgroup.danger .ncp-tool-ic { background: var(--danger-soft); color: var(--danger); }
.ncp-tool-main { flex: 1 1 170px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ncp-tool-main b { font-size: 13.5px; font-weight: 650; }
.ncp-tool-main small { font-size: 12px; color: var(--dim); line-height: 1.4; overflow-wrap: anywhere; }
.ncp-tool-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.ncp-tbtn { flex: none; }
.ncp-tbtn .ncp-ic { width: 14px; height: 14px; }
.ncp-tbtn[aria-busy="true"] { cursor: progress; opacity: .75; }
.ncp-tbtn[aria-expanded="true"] { border-color: var(--accent); background: var(--accent-soft); }
.ncp-tpanel {
  display: flex; flex-direction: column; gap: 10px; margin: 0 12px 12px; padding: 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border);
  animation: ncpPop .28s cubic-bezier(.2, .9, .3, 1.1) both;
}
.ncp-tpanel > .ncp-hint { margin: 0; }
.ncp-tpanel-label { font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--dim); }
.ncp-quote {
  white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.5; max-height: 220px; overflow-y: auto; padding: 9px 11px;
  border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--ncp-row);
}
.ncp-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 14px; margin: 0; font-size: 13px; }
.ncp-kv dt { color: var(--dim); font-weight: 600; }
.ncp-kv dd { margin: 0; overflow-wrap: anywhere; }
.ncp-mems { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
.ncp-mem { display: flex; align-items: flex-start; gap: 8px; padding: 8px 6px 8px 11px; border-radius: 10px; background: var(--ncp-row); border: 1px solid var(--border); }
.ncp-mem-main { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
.ncp-mem-main small { display: block; font-size: 11.5px; color: var(--dim); margin-top: 2px; }
.ncp-memadd { display: flex; gap: 8px; }
.ncp-memadd .nc-input { flex: 1; min-width: 0; height: 34px; }
.ncp-iconbtn {
  width: 30px; height: 30px; border-radius: 9px; border: 1px solid transparent; background: none; color: var(--dim); padding: 0;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; transition: color .15s, background .15s, border-color .15s, opacity .15s;
}
.ncp-iconbtn:hover:not(:disabled), .ncp-iconbtn:focus-visible { color: var(--danger); background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.ncp-iconbtn:disabled { opacity: .4; cursor: default; }
.ncp-iconbtn[aria-busy="true"] { cursor: progress; }

/* ================= chats ================= */
.ncp-chats { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 16px; align-items: start; }
.ncp-chats-side { position: sticky; top: 92px; max-height: calc(100dvh - 124px); display: flex; flex-direction: column; padding: 14px 10px; }
.ncp-side-title { margin: 0 8px 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--dim); }
.ncp-picker { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; scrollbar-width: thin; min-height: 0; }
.ncp-pick {
  display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 11px; border: 1px solid transparent; background: none; color: var(--muted);
  font: inherit; font-size: 14px; text-align: left; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.ncp-pick:hover { background: var(--hover); color: var(--text); }
.ncp-pick[aria-pressed="true"] { color: var(--text); background: linear-gradient(90deg, rgba(30, 144, 255, .2), rgba(79, 210, 255, .08)); border-color: rgba(79, 170, 255, .32); }
.ncp-pick .nc-avatar { width: 28px; height: 28px; font-size: 12px; }
.ncp-pick-all { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); color: var(--text); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ncp-pick-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.ncp-pick-n { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 1px 8px; font-variant-numeric: tabular-nums; }
.ncp-pick[aria-pressed="true"] .ncp-pick-n { background: var(--grad); color: #fff; }
.ncp-chats-main { min-height: 320px; }
.ncp-deep { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.ncp-cmeta { font-size: 12.5px; color: var(--dim); margin: 12px 2px 2px; min-height: 1.2em; }
.ncp-clist { display: flex; flex-direction: column; }
.ncp-group { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); padding: 14px 10px 5px; }
.ncp-crow {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 10px; border: 0; border-radius: 12px; background: none; color: inherit;
  font: inherit; text-align: left; cursor: pointer; transition: background .12s;
}
.ncp-crow:hover { background: var(--hover); }
.ncp-crow .nc-avatar { width: 30px; height: 30px; font-size: 12.5px; margin-top: 1px; }
.ncp-crow-ic { width: 30px; height: 30px; border-radius: 9px; background: var(--surface-2); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ncp-crow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ncp-crow-title { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ncp-crow-sub { font-size: 12.5px; color: var(--dim); }
.ncp-crow-sub:empty { display: none; }
.ncp-snippet {
  font-size: 13px; color: var(--muted); line-height: 1.45; margin-top: 4px; padding: 6px 9px; border-radius: 8px; background: var(--ncp-row); border-left: 2px solid var(--accent);
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.ncp-crow-time { font-size: 12px; color: var(--dim); white-space: nowrap; margin-top: 2px; }
.ncp-crow-item { position: relative; display: flex; align-items: center; gap: 2px; border-radius: 12px; transition: background .12s; }
.ncp-crow-item:hover, .ncp-crow-item:focus-within { background: var(--hover); }
.ncp-crow-item > .ncp-crow { flex: 1; min-width: 0; }
.ncp-crow-item > .ncp-crow:hover { background: none; }
.ncp-crow-del { margin-right: 6px; opacity: .45; }
.ncp-crow-item:hover .ncp-crow-del, .ncp-crow-del:focus-visible, .ncp-crow-del[aria-busy="true"] { opacity: 1; }
@media (hover: none) { .ncp-crow-del { opacity: .85; } }
.ncp-crow-del:disabled, .ncp-crow-item:hover .ncp-crow-del:disabled { opacity: .3; }
.ncp-mini { margin-left: 6px; font-size: 12px; }
.ncp-snippet mark, .ncp-crow-title mark, .ncp-viewer mark { background: var(--ncp-mark); color: inherit; border-radius: 3px; padding: 0 1px; }
.ncp-chats + .ncp-hint .ncp-ic { display: inline-block; vertical-align: -3px; }

.ncp-off { text-align: center; padding: 26px 12px; max-width: 540px; margin: 0 auto; }
.ncp-off-ic { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 18px; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: var(--glow); }
.ncp-off-ic .ncp-ic { width: 26px; height: 26px; }
.ncp-off h3 { margin: 0 0 8px; font-size: 18px; }
.ncp-off p { margin: 0 0 18px; color: var(--muted); line-height: 1.55; font-size: 14px; }

/* chat viewer */
.nc-modal.ncp-viewer { max-width: 980px; height: min(calc(100dvh - 40px), 1040px); }
[data-theme="light"] .nc-modal.ncp-viewer { background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--neon, var(--border)) border-box; }
.ncp-viewer .nc-modal-head h2 { overflow-wrap: anywhere; }
.ncp-viewer .nc-modal-body { flex: 1; padding-top: 2px; }
.ncp-vinfo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 4px 0 14px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.ncp-vperson { display: inline-flex; align-items: center; gap: 9px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s; }
.ncp-vperson:hover { border-color: var(--accent); }
.ncp-vperson > span { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.ncp-vperson b { font-size: 13.5px; }
.ncp-vperson small { font-size: 11.5px; color: var(--dim); }
.ncp-vperson .nc-avatar { width: 30px; height: 30px; font-size: 12.5px; }
.ncp-vacts { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.ncp-vacts .ncp-ic { width: 14px; height: 14px; }
.ncp-thread { padding: 4px 0 14px; gap: 16px; }
.ncp-turn { display: flex; flex-direction: column; gap: 4px; max-width: 88%; min-width: 0; }
.ncp-turn.user { align-self: flex-end; align-items: flex-end; }
.ncp-turn.assistant { align-self: flex-start; align-items: flex-start; }
.ncp-turn .nc-msg { max-width: 100%; box-sizing: border-box; }
.ncp-turn-who { font-size: 11.5px; font-weight: 700; color: var(--dim); letter-spacing: .03em; padding: 0 4px; }
.ncp-hl .nc-msg { box-shadow: 0 0 0 2px var(--accent), 0 0 30px -6px rgba(30, 144, 255, .8); animation: ncpHl 1.4s ease-in-out 2; }
@keyframes ncpHl { 50% { box-shadow: 0 0 0 5px rgba(30, 144, 255, .35), 0 0 44px -4px rgba(79, 210, 255, .9); } }
.ncp-utext { white-space: pre-wrap; }
.ncp-md { white-space: normal; }
.ncp-md > :first-child { margin-top: 0; }
.ncp-md > :last-child { margin-bottom: 0; }
.ncp-md p { margin: 0 0 .7em; }
.ncp-md ul, .ncp-md ol { margin: 0 0 .7em; padding-left: 1.4em; }
.ncp-md li { margin: .15em 0; }
.ncp-md li.ncp-sub { margin-left: 1.2em; list-style-type: circle; }
.ncp-md code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .86em; background: var(--surface-2); padding: .1em .35em; border-radius: 5px; overflow-wrap: anywhere; }
.ncp-md a { color: var(--accent); text-underline-offset: 2px; overflow-wrap: anywhere; }
.ncp-md blockquote { margin: 0 0 .7em; padding: 2px 0 2px 12px; border-left: 3px solid var(--border-strong); color: var(--muted); }
.ncp-md hr { border: 0; border-top: 1px solid var(--border); margin: 1em 0; }
.ncp-md-h { font-weight: 750; margin: .9em 0 .4em; line-height: 1.3; }
.ncp-md-h.h1 { font-size: 1.22em; }
.ncp-md-h.h2 { font-size: 1.1em; }
.ncp-md-h.h3 { font-size: 1em; }
.ncp-code { margin: 0 0 .8em; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--code-bg); }
.ncp-code-head { display: flex; align-items: center; justify-content: space-between; padding: 3px 6px 3px 12px; background: var(--code-head); font-size: 12px; color: var(--muted); }
.ncp-code pre { margin: 0; padding: 12px; overflow-x: auto; font-size: 13px; line-height: 1.5; white-space: pre; }
.ncp-code pre code { background: none; padding: 0; font-size: inherit; overflow-wrap: normal; }
.ncp-md-table { overflow-x: auto; margin: 0 0 .8em; }
.ncp-md-table table { border-collapse: collapse; font-size: 13px; }
.ncp-md-table th, .ncp-md-table td { border: 1px solid var(--border); padding: 5px 9px; text-align: left; vertical-align: top; }
.ncp-md-table th { background: var(--surface-2); font-weight: 650; }
.ncp-reason { margin-bottom: 8px; }
.ncp-reason-btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--ncp-row); color: var(--muted);
  font: inherit; font-size: 12.5px; font-weight: 600; padding: 4px 11px; border-radius: 999px; cursor: pointer;
}
.ncp-reason-btn:hover { color: var(--text); border-color: var(--border-strong); }
.ncp-reason-btn small { font-weight: 400; color: var(--dim); }
.ncp-reason-body {
  margin-top: 8px; padding: 10px 12px; border-left: 3px solid var(--ncp-reason); border-radius: 0 10px 10px 0; background: var(--ncp-row);
  color: var(--muted); font-size: 13px; line-height: 1.55; white-space: pre-wrap; max-height: 320px; overflow-y: auto;
}
.ncp-imgs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; justify-content: flex-end; }
.ncp-img { display: block; border-radius: 12px; }
.ncp-img img { max-width: 240px; max-height: 240px; margin: 0; border-radius: 12px; border: 1px solid var(--border); object-fit: cover; display: block; }
.ncp-files { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; margin-top: 8px; }
.ncp-file-wrap { display: flex; flex-direction: column; align-items: flex-end; max-width: 100%; }
.ncp-file {
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; cursor: pointer; white-space: normal;
}
.ncp-file small { color: var(--dim); }
.ncp-file:disabled, .ncp-file.missing { cursor: default; color: var(--dim); }
.ncp-file-text {
  margin: 6px 0 0; padding: 10px; border-radius: 10px; background: var(--code-bg); border: 1px solid var(--border); font-size: 12px; line-height: 1.5;
  max-height: 260px; overflow: auto; white-space: pre-wrap; text-align: left; width: min(520px, 100%); box-sizing: border-box; font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.ncp-msg-err { margin-top: 6px; padding: 8px 10px; border-radius: 9px; background: var(--danger-soft); color: var(--danger); font-size: 13px; }
.ncp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.ncp-meta-model { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--muted); }
.ncp-meta-model .ncp-ic { width: 13px; height: 13px; }
.ncp-vote { font-size: 13px; }
.ncp-switched { color: var(--ncp-warn); font-weight: 600; }
.ncp-vfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--border); flex: none; }
.ncp-vfoot-mid { display: flex; flex-direction: column; align-items: center; gap: 1px; text-align: center; min-width: 0; }
.ncp-vnote { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--dim); }
.ncp-vnote .ncp-ic { width: 14px; height: 14px; }
.ncp-vfoot-mid small { font-size: 11.5px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ================= invites ================= */
.ncp-intro { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: 13.5px; }
.ncp-intro .ncp-ic { color: var(--accent); }
.ncp-intro b { color: var(--text); }
.ncp-fgrid { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 14px 16px; align-items: center; }
.ncp-frow { display: contents; }
.ncp-flabel { font-size: 13px; font-weight: 600; color: var(--muted); }
.ncp-fctl { min-width: 0; }
.ncp-fctl > select, .ncp-fctl > input { max-width: 440px; }
.ncp-createbar { display: flex; align-items: center; gap: 14px; justify-content: space-between; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.ncp-summary { margin: 0; flex: 1; min-width: 220px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.ncp-summary b { color: var(--text); }
.ncp-glow { animation: ncpGlow 1.8s ease-out 1; }
@keyframes ncpGlow { 0%, 100% { box-shadow: 0 18px 50px -30px rgba(0, 0, 20, .7); } 30% { box-shadow: 0 0 0 3px rgba(30, 144, 255, .5), 0 0 50px -10px rgba(79, 210, 255, .8); } }
.ncp-newlink {
  display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 18px; border: 1px solid transparent;
  background:
    radial-gradient(520px 170px at 0% 0%, rgba(34, 211, 238, .15), transparent 60%) padding-box,
    linear-gradient(var(--glass-strong, var(--surface)), var(--glass-strong, var(--surface))) padding-box,
    var(--neon, var(--border)) border-box;
  box-shadow: 0 20px 60px -30px rgba(30, 144, 255, .75); animation: ncpPop .45s cubic-bezier(.2, .9, .3, 1.2) both;
}
@keyframes ncpPop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.ncp-newlink-top { display: flex; align-items: center; gap: 12px; }
.ncp-newlink-ic { font-size: 28px; }
.ncp-newlink-txt { flex: 1; min-width: 0; }
.ncp-newlink-txt b { display: block; font-size: 16px; }
.ncp-newlink-txt small { color: var(--muted); font-size: 13px; }
.ncp-linkbox { display: flex; gap: 10px; flex-wrap: wrap; }
.ncp-linkbox input { flex: 1; min-width: 220px; height: 50px; font-size: 15px; color: var(--accent); font-weight: 500; }
.ncp-linkbtns { display: flex; gap: 8px; }
.ncp-linkbtns .nc-btn { height: 50px; padding: 0 20px; }
.ncp-invs { display: flex; flex-direction: column; gap: 10px; }
.ncp-inv { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--ncp-row); transition: border-color .15s; }
.ncp-inv:hover { border-color: var(--border-strong); }
.ncp-inv.used { opacity: .78; }
.ncp-inv-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ncp-inv-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.ncp-inv-title b { font-size: 15px; overflow-wrap: anywhere; }
.ncp-inv-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.ncp-inv-prog { display: grid; grid-template-columns: auto minmax(60px, 1fr) auto; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.ncp-inv-prog .ncp-bar { height: 7px; }
.ncp-inv-used b { color: var(--text); }
.ncp-inv-exp { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.ncp-inv-exp .ncp-ic { width: 14px; height: 14px; }
.ncp-inv-exp.soon { color: var(--ncp-warn); font-weight: 600; }
.ncp-inv-who { font-size: 13px; color: var(--muted); }
.ncp-inv-foot { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--dim); flex-wrap: wrap; }

/* ================= notify ================= */
.ncp-notify { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ncp-notify > .nc-card:last-child { position: sticky; top: 92px; }
.ncp-form { display: flex; flex-direction: column; gap: 16px; }
.ncp-pickbox { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--ncp-row); }
.ncp-pchips { display: flex; flex-wrap: wrap; gap: 7px; max-height: 220px; overflow-y: auto; padding: 2px; }
.ncp-pchip {
  position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.ncp-pchip:hover { color: var(--text); border-color: var(--accent); }
.ncp-pchip .nc-avatar { width: 24px; height: 24px; font-size: 11px; }
.ncp-pchip-check {
  position: absolute; left: 4px; top: 50%; width: 24px; height: 24px; margin-top: -12px; border-radius: 50%; background: var(--grad); color: #fff; z-index: 1;
  display: flex; align-items: center; justify-content: center; opacity: 0; transform: scale(.4); transition: opacity .15s, transform .2s cubic-bezier(.3, 1.4, .6, 1);
}
.ncp-pchip-check .ncp-ic { width: 14px; height: 14px; }
.ncp-pchip[aria-checked="true"] { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.ncp-pchip[aria-checked="true"] .ncp-pchip-check { opacity: 1; transform: none; }
.ncp-pchip small { color: var(--danger); font-size: 11px; }
.ncp-urgent { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--ncp-row); cursor: pointer; }
.ncp-urgent > span { display: flex; flex-direction: column; gap: 1px; }
.ncp-urgent b { font-size: 14px; }
.ncp-urgent small { font-size: 12.5px; color: var(--dim); }
.ncp-counter { font-size: 11.5px; color: var(--dim); font-variant-numeric: tabular-nums; }

.ncp-phone {
  position: relative; margin: 0 auto; width: 100%; max-width: 340px; min-height: 320px; padding: 14px; box-sizing: border-box; overflow: hidden;
  border-radius: 28px; border: 2px solid transparent; background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--neon, var(--border)) border-box; box-shadow: var(--shadow);
}
.ncp-phone::before { content: ''; display: block; width: 84px; height: 5px; border-radius: 3px; background: var(--border-strong); margin: 0 auto 14px; }
.ncp-inbox-head { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 10px; color: var(--text); }
.ncp-inbox-n { margin-left: auto; min-width: 18px; height: 18px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.ncp-ib { display: flex; gap: 10px; padding: 11px 12px; border-radius: 13px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 8px; }
.ncp-ib.unread { border-color: rgba(79, 170, 255, .38); background: linear-gradient(135deg, rgba(30, 144, 255, .14), rgba(79, 210, 255, .06)), var(--surface); animation: ncpPop .3s both; }
.ncp-ib > div { min-width: 0; flex: 1; }
.ncp-ib-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grad); margin-top: 6px; flex: none; }
.ncp-ib.ghost { opacity: .6; }
.ncp-ib.ghost .ncp-ib-dot { background: var(--border-strong); }
.ncp-ib.ghost i { display: block; height: 8px; border-radius: 4px; background: var(--surface-2); margin: 4px 0 8px; }
.ncp-ib.ghost i.short { width: 60%; margin-bottom: 2px; }
.ncp-ib-title { font-weight: 700; font-size: 14px; overflow-wrap: anywhere; }
.ncp-ib-text { font-size: 13px; color: var(--muted); margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ncp-ib-meta { font-size: 11.5px; color: var(--dim); margin-top: 5px; }
.ncp-phone .ph { opacity: .5; font-style: italic; }
.ncp-phone-dim { position: absolute; inset: 0; background: var(--overlay); display: flex; align-items: center; justify-content: center; padding: 18px; }
.ncp-urgcard {
  width: 100%; box-sizing: border-box; padding: 18px; border-radius: 18px; border: 1.5px solid transparent;
  background: linear-gradient(var(--glass-strong, var(--surface)), var(--glass-strong, var(--surface))) padding-box, linear-gradient(135deg, #f87171, #1e90ff) border-box;
  box-shadow: 0 20px 50px -20px rgba(248, 113, 113, .6); animation: ncpPop .35s both;
}
[data-theme="dark"] .ncp-urgcard { background: linear-gradient(#081226, #081226) padding-box, linear-gradient(135deg, #f87171, #1e90ff) border-box; }
.ncp-urg-from { font-weight: 800; font-size: 15px; margin-bottom: 10px; }
.ncp-urg-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; overflow-wrap: anywhere; }
.ncp-urg-text { font-size: 13.5px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.ncp-urg-time { font-size: 11.5px; color: var(--dim); margin-top: 8px; }
.ncp-urg-btn { margin-top: 14px; text-align: center; padding: 9px; border-radius: 10px; background: var(--grad); color: #fff; font-weight: 700; font-size: 14px; }

.ncp-hist { display: flex; flex-direction: column; }
.ncp-hist-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 2px; border-bottom: 1px solid var(--border); }
.ncp-hist-row:last-child { border-bottom: 0; }
.ncp-hist-ic { font-size: 17px; width: 36px; height: 36px; border-radius: 11px; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ncp-hist-main { flex: 1; min-width: 0; }
.ncp-hist-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; overflow-wrap: anywhere; }
.ncp-hist-text { font-size: 13px; color: var(--muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.ncp-hist-meta { font-size: 12px; color: var(--dim); margin-top: 4px; }
.ncp-hist-read { width: 120px; flex: none; display: flex; flex-direction: column; gap: 5px; text-align: right; }
.ncp-hist-read small { font-size: 12px; color: var(--muted); }
.ncp-hist-read b { color: var(--text); }
.ncp-hist-read .ncp-bar { height: 6px; }

/* ================= support ================= */
.ncp-anon {
  display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; padding: 9px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.45;
  color: var(--muted); background: var(--ncp-row); border: 1px dashed var(--border-strong); font-weight: 400;
}
.ncp-anon > .ncp-ic { color: var(--accent); margin-top: 1px; }
.ncp-form > .ncp-anon { margin-top: 0; }
.ncp-mb { margin-bottom: 12px !important; }
.ncp-dimmed { opacity: .55; pointer-events: none; transition: opacity .2s; }

.ncp-sintro {
  display: flex; align-items: center; gap: 12px 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: 16px; border: 1px solid transparent;
  background:
    radial-gradient(520px 160px at 0% 0%, rgba(79, 210, 255, .14), transparent 65%) padding-box,
    linear-gradient(var(--glass-strong, var(--surface)), var(--glass-strong, var(--surface))) padding-box,
    var(--neon-soft, var(--border)) border-box;
}
.ncp-sintro-ic { width: 44px; height: 44px; border-radius: 13px; background: var(--grad); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; box-shadow: var(--glow); }
.ncp-sintro-ic .ncp-ic { width: 22px; height: 22px; }
.ncp-sintro-main { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ncp-sintro-main b { font-family: var(--nc-title, inherit); font-size: 16px; font-weight: 700; }
.ncp-sintro-main small { color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.ncp-support .ncp-toolbar2 { margin: 12px 0 10px; }
.ncp-support .ncp-count { margin-left: auto; }

.ncp-tlist { display: flex; flex-direction: column; gap: 8px; }
.ncp-trow {
  position: relative; display: grid; grid-template-columns: 128px minmax(0, 1fr) auto 18px; align-items: center; gap: 12px; width: 100%; box-sizing: border-box;
  padding: 12px 12px 12px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--ncp-row); color: inherit; font: inherit; text-align: left;
  cursor: pointer; overflow: hidden; transition: border-color .15s, background .15s, transform .15s; animation: ncpPop .25s ease both;
}
.ncp-trow::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--dim); }
.ncp-trow.open::before { background: var(--danger); box-shadow: 0 0 12px var(--danger); }
.ncp-trow.working::before { background: var(--ncp-warn); box-shadow: 0 0 10px var(--ncp-warn); }
.ncp-trow.closed::before { background: var(--ok); opacity: .55; }
.ncp-trow:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); background: var(--hover); transform: translateY(-1px); }
.ncp-trow:hover .ncp-go { color: var(--accent); }
.ncp-trow-status { display: flex; }
.ncp-trow-main { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.ncp-trow-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ncp-trow-kind { font-size: 15px; flex: none; line-height: 1; }
.ncp-trow-msg { min-width: 0; font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ncp-trow.closed .ncp-trow-msg { color: var(--muted); font-weight: 500; }
.ncp-trow-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 12px; font-size: 12.5px; color: var(--dim); }
.ncp-trow-who { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.ncp-trow-who .nc-avatar { width: 20px; height: 20px; font-size: 10px; }
.ncp-trow-who b { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ncp-via.chat { color: var(--accent); font-weight: 600; }
.ncp-trow-time { font-size: 12px; color: var(--dim); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ncp-tchip .ncp-tdot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.nc-chip.danger.ncp-tchip .ncp-tdot { animation: ncpDot 1.8s ease-out infinite; }
@keyframes ncpDot { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 60%, transparent); } 80%, 100% { box-shadow: 0 0 0 6px transparent; } }

.ncp-thead {
  display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(79, 210, 255, .08), rgba(10, 60, 255, .1));
}
.ncp-thead-main { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.ncp-thead-main .ncp-plink { font-size: 16px; font-weight: 700; }
.ncp-thead-main small { color: var(--dim); font-size: 12.5px; }
.ncp-tmsg {
  white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.6; padding: 12px 14px; border-radius: 12px;
  background: var(--ncp-row); border: 1px solid var(--border); border-left: 3px solid var(--accent);
}
.ncp-tctx dd { white-space: pre-wrap; }
.ncp-terr { display: inline-block; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; color: var(--danger); background: var(--danger-soft); padding: 2px 7px; border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ncp-tlinks { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ncp-tlinks + .ncp-hint { margin-top: 8px; }
.ncp-tthread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ncp-tb {
  padding: 10px 13px; border-radius: 14px 14px 14px 4px; border: 1px solid rgba(79, 170, 255, .28);
  background: linear-gradient(135deg, rgba(30, 144, 255, .14), rgba(79, 210, 255, .05)), var(--surface);
}
.ncp-tb-who { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 12.5px; margin-bottom: 4px; }
.ncp-tb-who b { color: var(--accent); font-weight: 700; }
.ncp-tb-who small { color: var(--dim); white-space: nowrap; }
.ncp-tb-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.55; }
.ncp-tb-by { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 7px; font-size: 11.5px; color: var(--dim); }
.ncp-tb-by .ncp-ic { width: 12px; height: 12px; }
.ncp-treply h4 label { cursor: pointer; }
.ncp-treply-in { min-height: 96px; }
.ncp-treply-bar { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 6px; }
.ncp-treply-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.ncp-tstatus { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ncp-tstatus .ncp-ic, .ncp-treply-acts .ncp-ic, .ncp-tlinks .ncp-ic { width: 15px; height: 15px; }
.nc-btn.ncp-tst.on, .nc-btn.ncp-tst.on:disabled { opacity: 1; cursor: default; border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.ncp-tstatus + .ncp-hint { margin-top: 10px; }

/* ================= responsive ================= */
@media (max-width: 1420px) {
  .ncp-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .ncp-split, .ncp-notify { grid-template-columns: minmax(0, 1fr); }
  .ncp-notify > .nc-card:last-child { position: static; }
}
@media (max-width: 1180px) and (min-width: 901px), (max-width: 820px) {
  .ncp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ncp-stats .ncp-stat-support { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .ncp-chats { grid-template-columns: minmax(0, 1fr); }
  .ncp-chats-side { position: static; max-height: none; padding: 10px; }
  .ncp-side-title { display: none; }
  .ncp-picker {
    flex-direction: row; overflow-x: auto; gap: 6px; padding: 1px 24px 1px 1px; scroll-snap-type: x proximity; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  }
  .ncp-picker::-webkit-scrollbar { display: none; }
  .ncp-pick { flex: none; border-color: var(--border); border-radius: 999px; padding: 4px 10px 4px 4px; scroll-snap-align: start; }
  .ncp-pick-name { max-width: 140px; }
  .ncp-stats { gap: 10px; }
}
@media (max-width: 640px) {
  .ncp-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ncp-status { padding: 9px 10px; gap: 8px; }
  .ncp-status-ic { width: 28px; height: 28px; }
  .ncp-hero { padding: 18px; border-radius: 18px; }
  .ncp-hero h2 { font-size: 23px; }
  .ncp-hero-actions { width: 100%; }
  .ncp-hero-actions .nc-btn { flex: 1 1 auto; }
  .ncp-count { margin-left: 0; width: 100%; }
  .ncp-sort { flex: 1; }
  .ncp-toolbar .nc-search { flex-basis: 100%; }

  .ncp-fgrid { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .ncp-flabel { margin-top: 8px; }
  .ncp-createbar .nc-btn { flex: 1; }
  .ncp-inv-prog { grid-template-columns: minmax(0, 1fr) auto; }
  .ncp-inv-prog .ncp-bar { grid-column: 1 / -1; grid-row: 2; }
  .ncp-linkbtns { width: 100%; }
  .ncp-linkbtns .nc-btn { flex: 1; }
  .ncp-hist-read { width: 86px; }
  .ncp-crow-time { display: none; }
  .ncp-hero-orbit { width: 84px; height: 84px; }
  .ncp-hero-text { flex-basis: calc(100% - 110px); }
  .ncp-trow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "status time" "main main"; gap: 8px 10px; padding: 11px 12px 11px 14px; }
  .ncp-trow-status { grid-area: status; }
  .ncp-trow-time { grid-area: time; }
  .ncp-trow-main { grid-area: main; }
  .ncp-trow > .ncp-go { display: none; }
  .ncp-trow-msg { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
  .ncp-support .ncp-count { margin-left: 0; }
}
.ncp-short { display: none; }
@media (max-width: 560px) {
  .ncp-long { display: none; }
  .ncp-short { display: inline; }
  .ncp-hero-actions .nc-btn.primary { flex-basis: 100%; }
  .ncp-hero-actions .nc-btn:not(.primary) { flex: 1 1 0; }
  .nc-modal.ncp-viewer { height: 94dvh; max-height: 94dvh; }
  .ncp-hide-xs { display: none; }
  .ncp-turn { max-width: 94%; }
  .ncp-img img { max-width: 190px; max-height: 190px; }
  .ncp-stats .nc-stat-value { font-size: 22px; }
  .ncp-stats .nc-stat-label { font-size: 11px; }
  .ncp-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ncp-act { padding: 0 10px; font-size: 12.5px; white-space: normal; line-height: 1.2; height: auto; min-height: 34px; }
  .ncp-zone { padding: 12px; }
  .ncp-zstats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ncp-tool-row { padding: 10px; }
  .ncp-tool-main { flex-basis: calc(100% - 44px); }
  .ncp-tool-btns { width: 100%; padding-left: 43px; justify-content: flex-start; margin-left: 0; box-sizing: border-box; }
  .ncp-tpanel { margin: 0 10px 10px; padding: 10px; }
  .ncp-kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .ncp-kv dd { margin-bottom: 6px; }
  .ncp-vacts { margin-left: 0; width: 100%; }
  .ncp-vacts .nc-btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .ncp-tpanel { animation: none !important; }
  .ncp-pulse, .ncp-livedot, .ncp-hero::after, .ncp-newlink, .ncp-glow, .ncp-hl .nc-msg, .ncp-ib.unread, .ncp-urgcard, .ncp-status.bad .ncp-status-dot { animation: none !important; }
  .ncp-trow, .nc-chip.danger.ncp-tchip .ncp-tdot { animation: none !important; }
  .ncp-trow:hover { transform: none; }
  .ncp-click:hover, .ncp-status:hover { transform: none; }
  .ncp-device, .ncp-bar > span, .ncp-pchip-check { transition: none !important; }
}

/* "Effects off" (the chat app setting) keeps everything still here too. */
body.fx-off .ncp-hero::after, body.fx-off .ncp-trow, body.fx-off .ncp-pulse, body.fx-off .ncp-livedot, body.fx-off .nc-chip.danger.ncp-tchip .ncp-tdot { animation: none !important; }
