/* NeoPanel / Operations workspace
   Mission: make everyday server work legible, calm and quick.
   Contract: existing semantic theme + branding variables are the source of truth.
   Type: Inter UI, JetBrains Mono data; 12 / 13 / 14 / 16 / 24 / 28px.
   Rhythm: 4 / 8 / 12 / 16 / 24 / 32px. Radius: 6px controls, user-defined panels.
   Motion: 120ms feedback, 240ms settling entrance; no decorative pulsing.
   Do: use whitespace, quiet separators, visible focus, explicit action hierarchy.
   Don't: add stock art, glow panels, fixed-width content tracks, or theme overrides.
*/
:root {
  --np-fast: 120ms ease-out;
  --np-settle: 240ms cubic-bezier(.2, .8, .2, 1);
  --np-shadow: 0 12px 40px rgb(0 0 0 / 18%);
  --np-content-width: 1440px;
}

/* Shell and navigation */
.app { grid-template-columns: 224px minmax(0, 1fr); }
main { padding: 32px 32px 64px; overflow-x: auto; }
#nav { padding: 24px 12px 16px; gap: 4px; backdrop-filter: none; }
.brand { padding: 0 12px 24px; font-size: 18px; letter-spacing: -.6px; color: var(--tx); }
.brand .cube, .brand-icon { box-shadow: none; background: var(--ac); }
.ng { color: var(--tx-dim); padding: 20px 12px 8px; font-size: 10px; letter-spacing: .12em; }
#nav .nav-item { padding: 10px 12px; font-size: 13px; border-radius: 6px; }
#nav .nav-item.on { background: var(--ac-subtle); color: var(--tx); box-shadow: inset 2px 0 var(--ac); }
#nav .nav-item:hover, #nav .nb:hover { background: var(--card-hover); color: var(--tx); }
#nav :is(.nav-item, .nb, .nsearch, .chip2) { transition: background-color var(--np-fast), color var(--np-fast); }
#nav .nsearch { border: 1px solid var(--border); background: var(--card-inner); padding: 10px 12px; font-size: 12px; margin-bottom: 4px; }
.nsearch kbd, kbd { background: var(--card-inner); color: var(--tx-muted); border: 1px solid var(--border-light); border-radius: 4px; }
#nav .chip2 { background: var(--card-inner); padding: 12px; border-radius: 8px; }
.chip2 .who b { color: var(--tx); }
#nav .chip2 > .av, #nav .chip2 > svg { flex-shrink: 0; }
#nav .chip2 .who .mu { display: block; max-width: 100%; }
h1, h2, h3 { color: var(--tx); }
h1 { letter-spacing: -.035em; font-size: 28px; line-height: 1.25; }
h2 { letter-spacing: -.02em; font-size: 16px; }
.np-eyebrow { color: var(--tx-dim); font-size: 10px; text-transform: uppercase; letter-spacing: .14em; font-weight: 600; margin-bottom: 8px; }
.np-page-heading { margin-bottom: 24px; align-items: flex-end; flex-wrap: wrap; gap: 16px; }
.np-page-heading h1 { margin-bottom: 8px; }
.np-page-heading .mu { font-size: 13px; }
.np-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin: 24px 0 16px; }
.np-section-heading h2 { font-size: 20px; margin: 0; font-weight: 600; }
.np-section-heading p { font-size: 13px; color: var(--tx-muted); margin-top: 4px; max-width: 640px; }
.np-shortcut-hint { font-size: 11px; color: var(--tx-dim); display: flex; align-items: center; gap: 4px; }
.np-shortcut-hint kbd { padding: 2px 6px; }
.np-slot-container:empty { display: none; }

/* Shared surfaces and controls */
.card, .plugin-card, .vm-tile-card, .vm-icon-card { box-shadow: none; border-color: var(--border); }
.card:hover { border-color: var(--border); }
.btn { min-height: 36px; justify-content: center; line-height: 1.25; }
.btn.sm { min-height: 30px; }
.btn:not(.pr):not(.stop):not(.dg):hover { background: var(--card-hover); color: var(--tx); }
.btn:active:not(:disabled), .create-server-dashed-card:active { transform: translateY(1px); }
.btn.dg { background: color-mix(in srgb, var(--er) 16%, var(--card-bg-solid)); border-color: color-mix(in srgb, var(--er) 45%, var(--border)); color: var(--er); }
.btn.dg:hover:not(:disabled) { background: color-mix(in srgb, var(--er) 25%, var(--card-bg-solid)); border-color: var(--er); color: var(--er); }
.btn:disabled { opacity: .42; }
.btn svg { flex-shrink: 0; }
.badge { border-radius: 5px; font-size: 11px; font-weight: 500; gap: 6px; }
.badge .dot, .conn-dot, .con-live-pill i { box-shadow: none; animation: none; }
.chip { border-radius: 5px; }
input::placeholder, textarea::placeholder { color: var(--tx-dim); opacity: 1; }
input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea, .cselect-trigger { border-radius: 6px; transition: border-color var(--np-fast), background-color var(--np-fast); }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not(.con-cmd-input), select, .cselect-trigger { background-color: var(--card-inner); }
/* Core legacy resets suppress outlines with !important. Override only that reset. */
html body :is(button, a, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid var(--ac) !important; outline-offset: 3px; }
.sw:has(input:focus-visible) { outline: 2px solid var(--ac); outline-offset: 4px; border-radius: 16px; }
.sw:has(input:disabled) { opacity: .5; cursor: wait; }
.tabs, .atabs { border-bottom-color: var(--border); gap: 8px; }
.tabs button, .atabs button { font-size: 13px; padding: 12px 14px; transition: color var(--np-fast), background-color var(--np-fast); }
.tabs button.on, .atabs button.on { color: var(--tx); }

/* Server identity: honor all configured artwork, including the default URLs. */
.card.srvh { background: var(--card-bg); padding: 24px; gap: 20px; border-color: var(--border); box-shadow: none; }
.srvh-bg { display: none; }
.srvh.has-brand-art .srvh-bg { display: block; }
.srvh.has-brand-art .srvh-bg::after { background: linear-gradient(90deg, color-mix(in srgb, var(--card-bg-solid) 88%, transparent), color-mix(in srgb, var(--card-bg-solid) 45%, transparent)); }
.srvh h1, html[data-theme=light] .srvh h1 { color: var(--tx); font-size: 24px; font-weight: 600; letter-spacing: -.03em; }
.srv-hero-meta { gap: 10px; }
.srv-hero-sub, html[data-theme=light] .srv-hero-sub { color: var(--tx-muted); font-size: 12px; }
.srvh .mc-formatted-text, .srv-card-title .mc-formatted-text { text-shadow: none; font-weight: inherit; }
.srv-connection { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 12px; }
.srvh .eng-pill { background: var(--card-inner); border-color: var(--border); color: var(--tx-muted); font-size: 11px; }
.srvh .hst { gap: 8px 12px; font-size: 11px; }
.srvh .hst > .mono { color: var(--tx-dim); }
.copyable-ip { font-size: inherit; background: transparent; color: inherit; font-family: inherit; }
.srvh .copyable-ip { color: var(--tx); border-color: var(--border); padding: 5px 8px; }
.copyable-ip:hover { color: var(--tx); background: var(--ac-subtle); border-color: var(--border-accent); }
.srv-power-actions { flex-wrap: wrap; gap: 8px; }
.srvh .btn:not(.pr):not(.stop):not(.dg) { background: var(--card-inner); border-color: var(--border-light); color: var(--tx); backdrop-filter: none; }
.srvh .btn:not(.pr):not(.stop):not(.dg):hover:not(:disabled) { background: var(--card-hover); border-color: var(--border-light); }
.srvh .srv-power-actions .btn:is(.stop, .dg) { background: color-mix(in srgb, var(--card-bg-solid) 85%, var(--er)); border: 1px solid color-mix(in srgb, var(--er) 50%, var(--card-bg-solid)); color: var(--er); backdrop-filter: none; }
.srvh .srv-power-actions .btn:is(.stop, .dg):hover:not(:disabled) { background: color-mix(in srgb, var(--card-bg-solid) 70%, var(--er)); border-color: var(--er); }
.srvh .srv-power-actions .btn:disabled { opacity: 1; background: var(--card-bg-solid); color: var(--tx-dim); border-color: var(--border-light); cursor: not-allowed; }

/* Dashboard: summary strip, fleet, and activity with configured card artwork. */
.dash-grid { grid-template-columns: minmax(0, 1fr) 280px; grid-template-areas: 'overview overview' 'fleet activity'; gap: 24px; }
.np-dash-aside { display: contents; }
.np-allocation { grid-area: overview; display: flex; align-items: center; gap: 32px; padding: 20px 24px; }
.np-allocation h2 { width: 112px; flex-shrink: 0; margin: 0; font-size: 13px; color: var(--tx-muted); line-height: 1.6; }
.np-allocation-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; flex: 1; min-width: 0; }
.np-allocation-metrics > div { min-width: 0; }
.np-allocation-metrics .row { flex-wrap: wrap; gap: 4px; }
.np-allocation .meter-bar { margin-top: 10px; height: 3px; }
.np-recent-activity { grid-area: activity; padding: 20px; }
#srv-card-grid.np-server-grid { grid-area: fleet; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; align-items: stretch; }
.sift-server-card { text-decoration: none; color: var(--tx); transition: border-color var(--np-fast), background-color var(--np-fast); }
.sift-server-card:hover { transform: none; box-shadow: none; background: var(--card-hover); border-color: var(--border-light); }
.srv-card-banner { height: 52px; background-color: transparent; }
.srv-card-banner::after { display: none; }
.srv-card-banner.has-brand-art { height: 100px; }
.srv-card-banner.has-brand-art::after { display: block; background: linear-gradient(180deg, rgb(0 0 0 / 8%), rgb(0 0 0 / 38%)); }
.srv-card-banner.has-brand-art .srv-card-badge, .srv-card-banner.has-brand-art .srv-card-action-btn { background: var(--card-bg-solid); color: var(--tx); }
.srv-card-badge { background: var(--card-inner); color: var(--tx-muted); border-color: var(--border); backdrop-filter: none; left: 20px; top: 16px; font-size: 10px; }
.srv-card-actions { top: 12px; right: 16px; }
.srv-card-action-btn { background: transparent; color: var(--tx-dim); border-color: transparent; backdrop-filter: none; transition: background-color var(--np-fast); }
.srv-card-action-btn:hover { color: var(--tx); background: var(--card-inner); border-color: var(--border); }
.srv-card-body { padding: 8px 20px 20px; gap: 16px; }
.srv-card-title { color: var(--tx); font-size: 17px; letter-spacing: -.025em; }
.srv-card-sub-row { flex-wrap: wrap; gap: 8px; }
.srv-card-addr { font-size: 11px; }
.srv-meters-row { padding-top: 16px; gap: 16px; }
.srv-meter-head { flex-direction: column; align-items: flex-start; gap: 6px; white-space: normal; }
.srv-meter-val { color: var(--tx); font: 500 12px var(--font-mono); }
.srv-meter { gap: 8px; }
.meter-bar { background: var(--border); height: 3px; }
.meter-bar i { transition: width var(--np-settle); }
.create-server-dashed-card { font-family: inherit; font-size: 13px; background: transparent; border: 1px dashed var(--border-light); min-height: 224px; border-radius: var(--np-radius); transition: background-color var(--np-fast), border-color var(--np-fast); }
.create-server-dashed-card:hover { background: var(--ac-subtle); color: var(--tx); }
.create-icon-bubble { width: 32px; height: 32px; border-radius: 8px; background: var(--card-inner); }
.np-create-hint { font-size: 11px; font-weight: 400; color: var(--tx-dim); }
#srv-card-grid.vm-dash-list { grid-template-columns: minmax(0, 1fr); }
.vm-dash-row-bg { opacity: .25; }
.vm-dash-row .srv-meter-head { flex-direction: row; }

/* Console: dedicated working surface + restrained telemetry rail. */
.cgrid { grid-template-columns: minmax(0, 1fr) 256px; gap: 16px; margin-top: 0; }
.cwrap { box-shadow: none; border-color: var(--border-light); border-radius: var(--np-radius); height: 440px; min-height: 360px; max-height: none; }
.con-top-bar { background: var(--card-inner); color: var(--tx-muted); padding: 12px 16px; gap: 12px; }
.con-top-bar > .row { flex-wrap: wrap; }
.np-console-label { color: var(--tx); font-size: 12px; font-weight: 600; }
#con-buf-count { font-size: 10px; }
.con { padding: 16px 20px; font-size: 12px; line-height: 1.85; }
.cin { background: var(--card-inner); border-color: var(--border); min-height: 48px; }
.cin input { color: var(--tx); }
.stc { padding: 0; align-self: stretch; }
.srow { padding: 12px 16px; gap: 12px; border-color: var(--border); }
.srow .sic { background: transparent; color: var(--tx-dim); border: 0; width: 20px; }
.srow .mu { font-size: 11px; }
.srow b { font-size: 12px; color: var(--tx); }
.ch { padding: 16px 20px; }
.ch .big { font-size: 22px; letter-spacing: -.03em; }
.ch-tooltip { background: var(--card-bg-solid); box-shadow: var(--np-shadow); }
.ch-tooltip-row { color: var(--tx); }

/* Files, extensions and scheduled work share one table / toolbar language. */
.np-files-workspace, .np-plugins-workspace, .np-editor-workspace { margin-top: 24px; }
.np-files-toolbar { flex-wrap: wrap; gap: 16px; margin-bottom: 16px; padding: 16px; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--np-radius); }
.np-files-toolbar .breadcrumb { flex: 1 1 100%; }
.np-files-toolbar > .row { width: 100%; }
.breadcrumb { overflow-wrap: anywhere; }
.breadcrumb span:hover { color: var(--ac); }
/* Only a table-only card is edge-to-edge; admin cards also contain headings/forms. */
.card.tw:has(> table:first-child), .card.tw.np-schedule-table { padding: 0; }
th { background: var(--card-inner); font-size: 10px; letter-spacing: .07em; padding: 12px 16px; }
td { padding: 14px 16px; font-size: 13px; }
tr:hover td { background: var(--pn2); }
.file-table { table-layout: fixed; }
.file-table td { overflow-wrap: anywhere; }
.file-table .file-th-btn { color: var(--tx-muted); font-size: 11px; }
.file-table tr:has(input:checked) td { background: var(--ac-subtle); }
.np-file-open { display: block; max-width: 100%; border: 0; background: none; color: inherit; font: inherit; text-align: left; overflow-wrap: anywhere; cursor: pointer; padding: 4px 0; }
.np-file-open:hover { color: var(--ac); }
.np-editor-toolbar, .np-editor-file { flex-wrap: wrap; gap: 12px; }
.np-editor-toolbar { padding: 16px; margin-bottom: 12px; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--np-radius); }
.np-editor-file { min-width: 0; flex: 1; }
.np-editor-name { color: var(--tx); font-size: 13px; overflow-wrap: anywhere; }
#editor-save-status { border-left: 1px solid var(--border-light); padding-left: 12px; }
#editor-save-status:empty { display: none; }
#ed { min-height: 360px; line-height: 1.8; padding: 20px 24px; border-radius: var(--np-radius); }
.plugin-card { background: var(--card-bg); padding: 20px; border-radius: var(--np-radius); transition: border-color var(--np-fast); gap: 20px; }
.plugin-card:hover { transform: none; box-shadow: none; border-color: var(--border-light); }
.plugin-title { color: var(--tx); font-size: 14px; overflow-wrap: anywhere; }
.plugin-desc { line-height: 1.65; color: var(--tx-muted); }
.np-plugin-icon { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 10px; color: var(--ac); background: var(--ac-subtle); }
.np-schedules-workspace { margin-top: 24px; display: grid; gap: 16px; }
.np-schedules-workspace > .np-section-heading { margin: 0 0 4px; }
.np-schedules-heading { width: 100%; align-items: center; flex-wrap: wrap; gap: 16px; }
.np-schedule-table table { min-width: 880px; }
.np-schedule-table td:first-child { min-width: 160px; max-width: 240px; overflow-wrap: anywhere; }
.np-empty-state { padding: 48px 24px; text-align: center; }
.np-empty-state h3 { font-size: 16px; margin: 0 0 8px; }
.np-empty-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; margin: 0 auto 16px; color: var(--tx-muted); background: var(--card-inner); }
.np-page-loader { color: var(--tx-muted); font-size: 13px; }

/* Dialogs / transient feedback. Keep queue and draft state visible. */
.pbox, .ui-modal-box, .cselect-menu, .floating-ctx-menu, .file-ctx-menu, .cmenu { background: var(--card-bg-solid); border-color: var(--border-light); box-shadow: var(--np-shadow); }
.pbox { border-radius: var(--np-radius); }
.pal { background: rgb(0 0 0 / 55%); backdrop-filter: blur(4px); }
.ui-modal-box { padding: 24px; }
.ui-modal-box h3 { letter-spacing: -.025em; }
.ui-modal-actions { gap: 8px; padding-top: 16px; }
.toast, .upload-progress-widget { background: var(--card-bg-solid); color: var(--tx); border-color: var(--border-light); box-shadow: var(--np-shadow); }
.upload-progress-widget { max-width: calc(100vw - 32px); }
.upload-error { color: var(--er); overflow-wrap: anywhere; }

/* Admin content must wrap naturally; only the wide table gets a scroll region. */
.np-admin-info-card .row { flex-wrap: wrap; gap: 8px 12px; }
.np-admin-info-card .row > div, .np-admin-cluster-card > .row > div { min-width: 0; }
.np-admin-info-card .row > span, .np-admin-info-card .row > div > span { overflow-wrap: anywhere; }
.np-table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid var(--border); border-radius: 8px; }
.np-admin-server-table { min-width: 1120px; }
.np-admin-server-table td:first-child { min-width: 180px; max-width: 280px; overflow-wrap: anywhere; }
.np-admin-server-table :is(td:nth-child(2), td:nth-child(3), td:nth-child(5)) .chip { white-space: nowrap; }
.np-admin-server-table :is(td:nth-child(4), td:nth-child(7)) { white-space: nowrap; }
.np-server-id { display: block; margin-top: 4px; }
.np-server-actions { display: grid; grid-template-columns: repeat(2, max-content); justify-content: end; gap: 6px; }
.np-server-actions .btn { white-space: nowrap; }

/* Give URL fields useful space instead of squeezing them between three controls. */
.brand-media-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.brand-media-field { min-width: 0; }
.brand-media-field > label { color: var(--tx-muted); font-size: 13px; font-weight: 500; }
.brand-media-grid .brand-upload-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 8px; }
.brand-media-grid .brand-upload-row input[type="text"] { grid-column: 2 / -1; width: 100%; min-width: 0; }
.brand-media-grid [data-upload-btn] { grid-column: 2; justify-self: end; }

/* Native wheel, touch, and keyboard behavior with theme-aware scrollbar chrome. */
.pbox, .pal, .np-table-scroll { scrollbar-width: thin; scrollbar-color: var(--tx-dim) transparent; }
.pbox { scrollbar-gutter: stable; overscroll-behavior: contain; }
:is(.pbox, .pal, .np-table-scroll)::-webkit-scrollbar { width: 8px; height: 8px; }
:is(.pbox, .pal, .np-table-scroll)::-webkit-scrollbar-track { background: transparent; }
:is(.pbox, .pal, .np-table-scroll)::-webkit-scrollbar-thumb { background: var(--tx-dim); border: 2px solid transparent; border-radius: 8px; background-clip: padding-box; }
:is(.pbox, .pal, .np-table-scroll)::-webkit-scrollbar-corner { background: transparent; }
.np-skeleton { opacity: .5; }

@keyframes np-workspace-enter { from { opacity: .4; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.np-server-grid > .sift-server-card { animation: np-workspace-enter var(--np-settle) both; }
.np-server-grid > .sift-server-card:nth-child(2) { animation-delay: 30ms; }
.np-server-grid > .sift-server-card:nth-child(3) { animation-delay: 60ms; }

/* Reflow the workspace, not its content. Tables may scroll in their own region. */
@media (max-width: 1200px) {
  main { padding: 24px; }
  .dash-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'overview' 'fleet' 'activity'; }
  .np-allocation { gap: 24px; }
  .np-allocation-metrics { gap: 24px; }
  .cgrid { grid-template-columns: minmax(0, 1fr) 224px; }
  .srvh-main { flex-basis: 100%; }
  .file-table th:nth-child(6), .file-table td:nth-child(6) { width: 130px; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  #nav { padding: 8px 12px; gap: 4px; background: var(--nav-bg); }
  #nav .brand { padding: 0 12px 0 0; font-size: 15px; }
  #nav .nav-item { min-height: 40px; padding: 10px 12px; }
  #nav .nav-item.on { box-shadow: inset 0 -2px var(--ac); }
  #nav .nb { color: var(--tx); background: var(--card-inner); }
  main { padding: 24px 16px 48px; }
  .card.srvh { padding: 20px; }
  .cwrap { height: 420px; min-height: 340px; max-height: none; }
  .stc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .srow { min-width: 0; }
  .srow > div { min-width: 0; overflow-wrap: anywhere; }
  .np-allocation { display: block; }
  .np-allocation h2 { width: auto; margin-bottom: 16px; }
  .np-allocation-metrics { gap: 20px; }
  .np-allocation-metrics .row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  h1 { font-size: 24px; }
  .np-page-heading { align-items: flex-start; }
  .np-page-heading > .row { width: 100%; }
  .np-shortcut-hint { display: none; }
  .card.srvh { padding: 16px; gap: 16px; }
  .srvh h1, html[data-theme=light] .srvh h1 { font-size: 22px; }
  .srv-power-actions { width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
  .srvh .srv-power-actions .btn { min-width: 0; min-height: 40px; padding: 8px 4px; font-size: 11px; }
  .srvh .srv-power-actions .btn svg { display: none; }
  .np-allocation { padding: 16px; }
  .np-allocation-metrics { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .np-allocation-metrics .row { flex-direction: row; justify-content: space-between; }
  #srv-card-grid.np-server-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .np-files-toolbar { padding: 12px; }
  .np-files-toolbar > .row { gap: 8px; }
  .np-files-toolbar .btn { min-height: 40px; }
  .file-table th:nth-child(6), .file-table td:nth-child(6) { display: none; }
  .file-table td, .file-table th { font-size: 12px; }
  .np-editor-toolbar > .row { width: 100%; }
  #ed { padding: 16px; min-height: 360px; }
  .plugin-card { flex-wrap: wrap; padding: 16px; gap: 16px; }
  .plugin-card > .row { width: 100%; justify-content: flex-end; }
  .np-schedules-heading > .row { flex-wrap: wrap; }
  .np-section-heading { margin-top: 20px; }
  .np-section-heading p { line-height: 1.6; }
  .np-empty-state { padding: 32px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Team access, invitation registration and ordered automation. */
.np-team-stack { display: grid; gap: 20px; }
.np-team-stack > .card { padding: 22px; }
.np-team-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.np-team-heading h2, .np-team-heading h3 { margin: 0; }
.np-team-heading p, .np-team-modal > p, .np-schedule-modal > p { margin-top: 6px; font-size: 13px; line-height: 1.6; }
.np-team-heading .row, .np-team-invitations .row { flex-wrap: wrap; gap: 8px; }
.np-team-stack #subusers-list-wrap table { min-width: 620px; }
.np-team-invitations { min-width: 720px; }
.np-team-invitations td:first-child { overflow-wrap: anywhere; }
.np-team-notice { padding: 12px 14px; border: 1px solid var(--border-light); border-radius: 8px; background: var(--card-inner); color: var(--tx-muted); font-size: 13px; line-height: 1.6; margin: 14px 0; }
.np-team-modal, .np-schedule-modal { padding: 24px; max-width: 680px; max-height: calc(100dvh - 64px); overflow-y: auto; }
.np-team-modal form, .np-schedule-modal form { margin-top: 18px; }
.np-team-modal .subuser-perm-item b, .np-team-modal .subuser-perm-item .mu { display: block; }
.np-team-modal .subuser-perm-item b { font-size: 13px; }
.np-team-modal .subuser-perm-item .mu { font-size: 11px; line-height: 1.4; }
.np-invitation-shell { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px 16px; overflow-y: auto; background: var(--bg-deep); }
main.np-invitation-card { width: 100%; max-width: 520px; padding: 28px; margin: auto; }
.np-invitation-card h1 { font-size: 25px; overflow-wrap: anywhere; margin: 0 0 12px; }
.np-invitation-card > p { font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; margin-bottom: 16px; }
.np-invitation-card .brand { padding: 0 0 26px; }
.np-invite-permissions { padding: 12px; border: 1px solid var(--border); border-radius: 8px; margin: 16px 0; font-size: 13px; }
.np-invite-permissions summary, .np-task-summary summary { cursor: pointer; }
.np-invite-permissions ul, .np-task-summary ol { margin: 10px 0 0 20px; line-height: 1.7; }
.np-schedule-step { padding: 16px; background: var(--card-inner); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 12px; }
.np-schedule-step .np-team-heading { margin-bottom: 12px; }
.np-continue-step { margin: 16px 0; font-size: 12px; gap: 10px; align-items: flex-start; }
.np-continue-step input { flex-shrink: 0; }
.np-task-summary { min-width: 90px; max-width: 260px; font-size: 12px; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .np-team-stack > .card, .np-team-modal, .np-schedule-modal, main.np-invitation-card { padding: 18px; }
  .np-team-heading > .row { width: 100%; }
  .np-team-heading .btn { min-height: 38px; }
  .np-schedule-step { padding: 12px; }
}
.np-restore-notice { margin-top: 16px; }
.np-restore-notice p { margin: 8px 0 0; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.pal:has(> .np-team-modal), .pal:has(> .np-schedule-modal) { padding: 32px 16px; }

/* Admin navigation lives in the sidebar; this strip reports useful live context. */
.np-admin-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.np-admin-heading > svg { flex-shrink: 0; color: var(--tx-muted); }
.np-admin-heading .np-eyebrow { margin-bottom: 5px; }
.np-admin-heading h1 { margin: 0; }
.np-admin-heading p { margin: 6px 0 0; font-size: 13px; color: var(--tx-muted); }
.np-admin-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; align-items: center; gap: 20px; padding: 16px 20px; margin-bottom: 24px; background: var(--card-inner); border: 1px solid var(--border); border-radius: var(--np-radius); }
.np-admin-summary .mu { display: block; font-size: 11px; margin-bottom: 5px; }
.np-admin-summary strong { font-size: 13px; font-weight: 600; color: var(--tx); overflow-wrap: anywhere; }
.np-admin-summary-actions { display: grid; justify-items: end; gap: 5px; }
.np-admin-summary-actions .mu { margin: 0; }
@media (max-width: 1100px) {
  .np-admin-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .np-admin-summary-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
}
@media (max-width: 600px) {
  .np-admin-heading { align-items: flex-start; gap: 12px; }
  .np-admin-heading h1 { font-size: 24px; }
  .np-admin-summary { padding: 16px; }
}

/* Decorated sign-in fields use their wrapper as the single visible focus target. */
.login .lf input { min-width: 0; }
html body .login .lf input:focus-visible { outline: none !important; outline-offset: 0; }
.login .lf:focus-within { border-color: var(--ac); box-shadow: 0 0 0 3px var(--ac-glow); }
#l2fa-code { text-align: center; font-size: 17px; font-weight: 600; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
#l2fa-code::placeholder { font-size: 14px; font-weight: 400; letter-spacing: normal; }

.np-auth-divider { display: flex; align-items: center; gap: 12px; color: var(--tx-dim); font-size: 12px; margin: 16px 0; }
.np-auth-divider::before, .np-auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.np-passkey-signin { width: 100%; min-height: 42px; justify-content: center; background: var(--card-inner); }
.np-passkey-support { margin-top: 10px; line-height: 1.5; }
.np-passkey-card > .np-team-heading { align-items: flex-start; }
.np-passkey-card > .np-team-heading > div:first-child { flex: 1 1 340px; }
.np-passkey-table { min-width: 520px; }
.np-passkey-modal { max-width: 480px; padding: 24px; max-height: calc(100dvh - 64px); overflow-y: auto; }
.np-passkey-modal > p { margin: 10px 0 18px; font-size: 13px; line-height: 1.6; }
.pal:has(> .np-passkey-modal) { padding: 32px 16px; }
@media (max-width: 600px) { .np-passkey-modal { padding: 18px; } }

/* Keep file icons centered and row labels aligned with the Name heading. */
.np-file-table-card { padding: 0; overflow: visible; }
.np-file-table-card .file-table { border-collapse: separate; border-spacing: 0; border-radius: inherit; }
.np-file-table-card .file-select-cell { width: 44px; padding: 12px 12px 12px 16px; }
.np-file-table-card .file-select-cell input { display: block; margin: 0; }
.np-file-table-card .file-icon-cell { width: 44px; padding: 12px 8px; text-align: center; line-height: 0; vertical-align: middle; }
.np-file-table-card .file-icon-cell > .fi-badge { display: flex; margin-inline: auto; }
.np-file-table-card .file-name-cell { padding: 12px; text-align: left; }
/* Round the cell backgrounds rather than clipping menus outside the table. */
.np-file-table-card thead tr:first-child th:first-child { border-top-left-radius: max(0px, calc(var(--np-radius) - 1px)); }
.np-file-table-card thead tr:first-child th:last-child { border-top-right-radius: max(0px, calc(var(--np-radius) - 1px)); }
.np-file-table-card tbody tr:last-child td:first-child { border-bottom-left-radius: max(0px, calc(var(--np-radius) - 1px)); }
.np-file-table-card tbody tr:last-child td:last-child { border-bottom-right-radius: max(0px, calc(var(--np-radius) - 1px)); }
.np-file-table-card .file-th-btn { margin-inline: 0; padding-inline: 0; }

/* Access, governance and community: retain the existing semantic theme. */
#nav .nav-item[aria-disabled="true"] { color: var(--tx-dim); opacity: .55; cursor: not-allowed; background: transparent; box-shadow: none; }
#nav .nav-item[aria-disabled="true"]:hover { color: var(--tx-dim); background: var(--card-inner); }
.np-access-state { max-width: 720px; margin: 32px auto; padding: 32px; }
.np-access-state p { line-height: 1.7; margin: 16px 0 24px; }
.np-access-state .row { flex-wrap: wrap; gap: 8px; }
.np-announcement { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border: 1px solid var(--border-light); border-left: 3px solid var(--ac); border-radius: 8px; background: var(--card-inner); margin-bottom: 24px; font-size: 13px; line-height: 1.6; }
.np-announcement > span { flex: 1; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.np-announcement > button { flex: 0 0 28px; width: 28px; height: 28px; padding: 0; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.np-announcement > button > svg { display: block; flex-shrink: 0; }
.np-announcement.is-success { border-left-color: var(--ok); }
.np-announcement.is-warning { border-left-color: var(--wn); }
.np-discord-card { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 20px 24px; margin-top: 24px; }
.np-discord-card > svg { color: #808aff; flex-shrink: 0; }
.np-discord-card > div { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.np-discord-card h2 { margin: 0 0 4px; }
.np-discord-card p { font-size: 12px; margin: 0; }
.np-community-form { display: grid; gap: 16px; }
.np-community-form .row { flex-wrap: wrap; gap: 8px; }
.np-permission-choice { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; line-height: 1.5; cursor: pointer; }
.np-permission-choice input { margin-top: 4px; flex-shrink: 0; }
.np-permission-choice small { display: block; color: var(--tx-muted); margin-top: 4px; }
.np-community-form .card { padding: 24px; }
.np-community-form p { font-size: 13px; line-height: 1.7; margin: 12px 0; }
.np-community-form .np-section-heading { margin-top: 0; }
.np-community-diagnostic { padding: 12px; background: var(--card-inner); border-radius: 6px; }
.np-form-error { color: var(--er); line-height: 1.6; margin: 12px 0; }
.np-form-error:empty { display: none; }
.np-settings-tabs { flex-wrap: wrap; margin-bottom: 24px; }
/* Keep the focus treatment inside the rounded search header, not clipped by it. */
#pal .pbox { display: flex; flex-direction: column; max-height: min(80dvh, 680px); overflow: visible; }
.np-palette-input { padding: 8px; border-radius: var(--np-radius) var(--np-radius) 0 0; flex-shrink: 0; background: var(--card-bg-solid); }
html body #pal #pq { border-radius: max(4px, calc(var(--np-radius) - 6px)); border: 1px solid var(--border-light); box-shadow: none; width: 100%; }
html body #pal #pq:focus-visible { outline: 2px solid var(--ac) !important; outline-offset: -2px; }
#pal .plist { min-height: 0; overflow-y: auto; padding: 4px 8px 12px; border-radius: 0 0 var(--np-radius) var(--np-radius); }
html body #pal .pit:focus-visible { outline-offset: -2px; }
/* Compact console telemetry only; dashboard server cards remain unchanged. */
.cgrid { grid-template-columns: minmax(0, 1fr); }
.cgrid #stc { display: grid; grid-template-columns: repeat(auto-fit, minmax(152px, 1fr)); padding: 8px; gap: 0; }
.cgrid #stc .srow { padding: 8px 12px; min-width: 0; border-bottom: 0; border-right: 1px solid var(--border); }
.cgrid #stc .srow:last-child { border-right: 0; }
.cgrid #stc .srow b { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .np-access-state { padding: 24px; margin: 16px 0; }
  .np-access-state h1 { font-size: 24px; }
  .np-discord-card, .np-community-form .card { padding: 16px; }
  .np-community-form .g2 { grid-template-columns: minmax(0, 1fr); }
  .np-settings-tabs { gap: 4px; }
  .np-settings-tabs button { padding: 10px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .np-announcement, #pal .pbox { animation: none; transition: none; }
}
.np-server-settings-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.np-server-settings-group[hidden] { display: none; }
.np-server-settings-group > .card { min-width: 0; }
.np-server-settings-group[data-settings-panel="2"] { grid-template-columns: minmax(0, 1fr); }
.np-server-settings-group input, .np-server-settings-group select { min-width: 0; }
.np-server-settings-group .row { flex-wrap: wrap; }
@media (max-width: 900px) { .np-server-settings-group { grid-template-columns: minmax(0, 1fr); } }
.np-community-fields { display: grid; gap: 16px; border: 0; margin: 0; padding: 0; min-width: 0; }
.np-community-fields:disabled { opacity: .7; }
.cgrid #stc .srow > div { min-width: 0; }
.floating-ctx-menu button:disabled { color: var(--tx-dim); opacity: .5; cursor: not-allowed; }

/* Steel is a separate informational card, not an extension of the server hero. */
.srvh + .steel-info { margin-top: 20px; }
.steel-info { display: grid; gap: 18px; align-content: start; padding: 24px; }
.steel-info-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.steel-info-heading > img { flex: 0 0 40px; object-fit: contain; }
.steel-info h2 { margin: 0; color: var(--tx); font-size: 20px; line-height: 1.3; }
.steel-info-subtitle { display: block; margin-top: 4px; color: var(--tx-muted); font-size: 12px; }
.steel-info-badge { margin-left: auto; padding: 5px 9px; border: 1px solid rgba(245,158,11,.3); border-radius: 999px; color: #fbbf24; background: rgba(245,158,11,.08); font-size: 11px; font-weight: 600; }
.steel-info p { margin: 0; color: var(--tx-muted); font-size: 13px; line-height: 1.65; }
.steel-info .steel-info-intro { max-width: 86ch; color: var(--tx); font-size: 14px; }
.steel-info-warning { padding: 12px 14px; border-left: 3px solid #d97706; border-radius: 0 8px 8px 0; background: rgba(245,158,11,.07); color: var(--tx-muted); font-size: 13px; line-height: 1.6; }
.steel-info-warning strong { color: var(--tx); }
.steel-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.steel-info h3 { margin: 0 0 6px; color: var(--tx); font-size: 13px; font-weight: 600; }
.steel-info-details { border-top: 1px solid var(--border); padding-top: 14px; min-width: 0; }
.steel-info-details summary { cursor: pointer; color: var(--tx-muted); font-size: 13px; font-weight: 600; line-height: 1.5; }
.steel-info-details summary:hover { color: var(--tx); }
.steel-info-details summary:focus-visible { outline: 2px solid var(--ac); outline-offset: 4px; border-radius: 3px; }
.steel-info-details dl { display: grid; gap: 14px; margin: 16px 0 0; }
.steel-info-details dt { margin-bottom: 4px; color: var(--tx); font-size: 12px; font-weight: 600; }
.steel-info-details dd { margin: 0; color: var(--tx-muted); font-size: 13px; line-height: 1.6; }
.steel-info code { overflow-wrap: anywhere; }
.steel-info-actions { display: flex; flex-wrap: wrap; gap: 10px; }
html[data-theme="light"] .steel-info-badge { color: #92400e; }
@media (max-width: 640px) {
  .steel-info { padding: 18px; gap: 16px; }
  .steel-info-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .steel-info-badge { margin-left: 0; }
}

/* Collection layouts: distinct densities, shared hierarchy, theme-aware surfaces. */
.vm-toggle { position: relative; isolation: isolate; display: inline-grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.vm-indicator { position: absolute; z-index: -1; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / 3); border-radius: 6px; background: var(--ac); box-shadow: 0 2px 8px var(--ac-glow); transform: translateX(calc(var(--vm-index, 0) * 100%)); pointer-events: none; }
.vm-toggle .vm-btn { justify-content: center; }
.vm-toggle .vm-btn.on { background: transparent; box-shadow: none; }
.vm-btn:focus-visible, .srv-card-action-btn:focus-visible, .sift-server-card:focus-visible { outline: 2px solid var(--ac); outline-offset: 3px; }
.srv-card-action-btn[aria-disabled="true"] { opacity: .45; cursor: wait; }
#srv-card-grid.vm-dash-icons { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.sift-server-card { min-width: 0; }
.srv-card-banner, .srv-card-banner.has-brand-art { height: 126px; background-color: var(--ac-subtle); background-image: radial-gradient(ellipse at top right, var(--ac-subtle), transparent 70%); }
.srv-card-banner::after, .srv-card-banner.has-brand-art::after { display: block; background: linear-gradient(180deg, transparent 20%, var(--card-bg-solid)); }
.srv-card-banner .srv-card-badges-left { top: 12px; left: 16px; }
.srv-card-identity { position: absolute; z-index: 1; left: 20px; bottom: 10px; display: flex; align-items: flex-end; gap: 12px; }
.srv-card-identity .srv-row-thumb { width: 48px; height: 48px; padding: 5px; border: 1px solid var(--border-light); border-radius: 12px; background: var(--card-bg-solid); box-shadow: 0 4px 12px rgb(0 0 0 / 15%); filter: none; }
.srv-card-identity > span { color: var(--tx-muted); font: 11px var(--font-mono); padding-bottom: 5px; }
.srv-card-body { padding: 10px 20px 16px; gap: 12px; }
.srv-card-title-row { flex-wrap: wrap; gap: 8px; }
.srv-card-title { font-size: 17px; line-height: 1.4; }
.srv-card-addr { max-width: 100%; min-width: 0; }
.srv-card-addr .pv { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srv-meters-row { gap: 8px; padding-top: 12px; }
.srv-meters-row .srv-meter { padding: 10px; background: var(--card-inner); border: 1px solid var(--border); border-radius: 8px; min-width: 0; }
.srv-meters-row .srv-meter-head > span:first-child { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.srv-meters-row .meter-bar { height: 3px; border-radius: 4px; overflow: hidden; }
.srv-meters-row .srv-meter:nth-child(2) .meter-bar i { background: var(--ok); }
.srv-meters-row .srv-meter:nth-child(3) .meter-bar i { background: var(--wn); }
.srv-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 10px; color: var(--tx-muted); }
.srv-card-foot > span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; overflow-wrap: anywhere; }
.srv-card-open { color: var(--ac); white-space: nowrap; }
.sift-server-card.vm-dash-icon .srv-card-banner { height: 110px; }
.sift-server-card.vm-dash-icon .srv-card-identity { left: 14px; }
.sift-server-card.vm-dash-icon .srv-meters-row .srv-meter { padding: 7px; }
.sift-server-card.vm-dash-icon .srv-card-open { font-size: 0; }
.sift-server-card.vm-dash-row { background: var(--card-bg); border-radius: 10px; }
.vm-dash-row-main { min-width: 0; }
.vm-dash-row-bg { opacity: .12; }
.vm-dash-row .srv-row-thumb { padding: 4px; background: var(--card-inner); border-radius: 10px; filter: none; }
.vm-icon-card, .vm-tile-card { background: var(--card-inner); }
.vm-icons-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 156px), 1fr)); }
.vm-icons-grid.wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 195px), 1fr)); }
.vm-file-center { padding: 12px 2px 8px; gap: 12px; }
.vm-file-card .fi-badge { background: var(--ac-subtle); border: 1px solid var(--border); }
.vm-tile-file-row { min-height: 54px; }
.vm-tile-card .vm-item-foot { margin-top: 4px; }
@media (max-width: 600px) {
  .srv-card-body { padding: 10px 14px 14px; }
  .vm-dash-row-meters { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .vm-dash-row-actions { margin-left: auto; }
}

/* Selection is state, not a hover effect. Keep it visible in every file layout. */
input[type="checkbox"]:not(.no-ccheck):is(:checked, :indeterminate):hover:not(:disabled) { background: var(--ac); border-color: var(--ac); box-shadow: 0 0 0 3px var(--ac-subtle); }
.file-table tr.row-selected > td, .file-table tr.row-selected:hover > td { background: var(--ac-subtle); }
.file-table tr.row-selected > td:first-child { box-shadow: inset 3px 0 var(--ac); }
.vm-file-card.selected, .vm-file-card.selected:hover { background: var(--ac-subtle); border-color: var(--ac); box-shadow: inset 0 0 0 1px var(--ac); }
.file-trash-list { display: grid; gap: 10px; }
.file-trash-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 9px; background: var(--card-inner); }
.file-trash-item > div:first-child { min-width: 0; flex: 1 1 220px; overflow-wrap: anywhere; }
.file-trash-item .row { gap: 8px; flex-wrap: wrap; }
.file-delete-choice { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.file-delete-choice:has(input:checked) { background: color-mix(in srgb, var(--er) 12%, var(--card-bg-solid)); border-color: var(--er); }

.np-empty-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 14px; border: 1px solid var(--border-accent, var(--border)); border-radius: 15px; background: var(--ac-subtle); color: var(--ac); }
.np-empty-icon svg { display: block; stroke-width: 1.6; }
.np-empty-title { margin: 0 0 6px; color: var(--tx); font-size: 15px; font-weight: 700; }
#file-reload-btn[aria-busy="true"] { cursor: progress; }

.np-password-reset-backdrop { z-index: 10020; }
.np-password-reset { width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; }
.np-password-reset > p { font-size: 13px; line-height: 1.65; }
.np-password-reset h2 { display: flex; align-items: center; gap: 8px; }
.np-password-reset .f { display: grid; gap: 6px; margin-top: 14px; color: var(--tx); font-size: 12px; }
.np-password-reset .f input { width: 100%; min-width: 0; }
.np-password-reset .np-reset-notice { padding: 12px; background: var(--ac-subtle); border: 1px solid var(--border-accent); border-radius: 8px; }
.np-reset-switch { display: block; margin-top: 18px; padding: 0; border: 0; background: transparent; color: var(--ac); font: inherit; font-size: 12px; cursor: pointer; }
.np-reset-switch:hover { text-decoration: underline; }
.np-reset-switch:focus-visible { outline: 2px solid var(--ac); outline-offset: 4px; }
