/* Nexora OS — System Control Center */
#page-nexora-os { max-width: 1100px; margin: 0 auto; padding: 16px; }
.nxos-handoff {
  background: linear-gradient(135deg, #f0f9ff, #ecfeff);
  border: 1.5px solid #99f6e4;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 16px;
}
.nxos-handoff h2 { margin: 0 0 6px; font-size: 1rem; color: #0f766e; }
.nxos-handoff-meta {
  margin: 0 0 8px;
  font-size: .76rem;
  color: #64748b;
  line-height: 1.45;
}
.nxos-handoff pre {
  background: #0f172a; color: #e2e8f0; padding: 12px; border-radius: 10px;
  font-size: .68rem; line-height: 1.4; overflow: auto; margin: 10px 0;
}
.nxos-handoff-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px; margin-top: 10px;
}
.nxos-handoff-grid-2col {
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .nxos-handoff-grid-2col { grid-template-columns: repeat(2, 1fr); }
}
.nxos-handoff-card {
  background: #fff; border: 1px solid #cbd5e1; border-radius: 10px;
  padding: 10px; font-size: .74rem;
}
.nxos-handoff-card h4 { margin: 0 0 6px; font-size: .78rem; color: #0f766e; }
.nxos-handoff-child { margin: 4px 0; line-height: 1.35; }
.nxos-handoff-section-title {
  font-weight: 800; font-size: .72rem; margin: 8px 0 4px; color: #0f766e;
}
.nxos-handoff-data {
  margin-top: 10px; font-size: .7rem;
}
.nxos-handoff-data ul { margin: 4px 0 0 16px; }
.nxos-handoff-docs {
  font-size: .68rem; color: #64748b; margin-top: 8px; line-height: 1.45;
}
.nxos-muted { color: #64748b; }
.nxos-handoff-flow { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.nxos-handoff-step {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
  padding: 8px 10px; font-size: .7rem; flex: 1; min-width: 140px;
}
.nxos-handoff-step.green { border-color: #86efac; background: #ecfdf5; }
.nxos-handoff-step.orange { border-color: #fdba74; background: #fff7ed; }
.nxos-handoff-step.yellow { border-color: #fde68a; background: #fffbeb; }
.nxos-handoff-env {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px;
}
@media (max-width: 600px) { .nxos-handoff-env { grid-template-columns: 1fr; } }
.nxos-handoff-env .e {
  background: #fff; border-radius: 8px; padding: 8px; font-size: .72rem;
  border: 1px solid #e2e8f0;
}
.nxos-handoff-loading { text-align: center; padding: 12px; color: #64748b; font-size: .78rem; }
.nxos-loading { color: #64748b; padding: 20px; font-size: .82rem; }
.nxos-handoff .dg-vai {
  font-size: .66rem; font-weight: 700; color: #0f766e; padding: 4px 10px;
  border: 1px solid #99f6e4; border-radius: 7px; background: #ecfdf5;
  cursor: pointer; margin-top: 4px;
}
.nxos-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.nxos-head h1 { margin: 0; font-family: var(--serif); font-size: 1.45rem; color: #1e293b; }
.nxos-head p { margin: 4px 0 0; font-size: .82rem; color: #64748b; max-width: 560px; }
.nxos-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.nxos-btn {
  padding: 8px 14px; border-radius: 9px; font-size: .78rem; font-weight: 700;
  border: 1.5px solid #e2e8f0; background: #fff; cursor: pointer; font-family: inherit;
}
.nxos-btn.primary { background: #4f46e5; color: #fff; border-color: #4f46e5; }
.nxos-status-bar {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; margin-bottom: 16px;
  font-size: .72rem; align-items: center;
}
.nxos-pill {
  padding: 4px 10px; border-radius: 20px; font-weight: 700; white-space: nowrap;
}
.nxos-pill.ok { background: #ecfdf5; color: #065f46; }
.nxos-pill.warn { background: #fffbeb; color: #b45309; }
.nxos-pill.err { background: #fef2f2; color: #991b1b; }
.nxos-pill.info { background: #eff6ff; color: #1d4ed8; }
.nxos-flow {
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border: 1px solid #e2e8f0; border-radius: 14px; padding: 16px; margin-bottom: 16px;
  overflow-x: auto;
}
.nxos-flow-title { font-size: .72rem; font-weight: 800; text-transform: uppercase; color: #64748b; margin-bottom: 12px; }
.nxos-flow-row { display: flex; flex-direction: column; align-items: center; gap: 0; min-width: 280px; }
.nxos-flow-step {
  width: 100%; max-width: 420px; padding: 10px 14px; border-radius: 10px;
  border: 1.5px solid #e2e8f0; background: #fff; text-align: center;
}
.nxos-flow-step h3 { margin: 0 0 4px; font-size: .82rem; color: #1e293b; }
.nxos-flow-step p { margin: 0; font-size: .72rem; color: #64748b; line-height: 1.35; }
.nxos-flow-arrow { color: #94a3b8; font-size: 1.2rem; padding: 4px 0; }
.nxos-badges { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 6px; }
.nxos-tag {
  font-size: .58rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 6px; border-radius: 4px;
}
.nxos-tag.auto { background: #dbeafe; color: #1e40af; }
.nxos-tag.human { background: #fce7f3; color: #9d174d; }
.nxos-tag.opt { background: #f1f5f9; color: #64748b; }
.nxos-tag.mock { background: #fef3c7; color: #92400e; }
.nxos-tag.api { background: #ede9fe; color: #5b21b6; }
.nxos-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) { .nxos-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .nxos-grid { grid-template-columns: repeat(3, 1fr); } }
.nxos-card {
  border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px; background: #fff;
  border-left: 4px solid #94a3b8;
}
.nxos-card.ok { border-left-color: #10b981; }
.nxos-card.warn { border-left-color: #f59e0b; }
.nxos-card.err { border-left-color: #ef4444; }
.nxos-card.mock { border-left-color: #a855f7; }
.nxos-card-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.nxos-card-h strong { font-size: .88rem; color: #0f172a; }
.nxos-card-st { font-size: .65rem; font-weight: 800; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: #f1f5f9; color: #475569; }
.nxos-card p, .nxos-card ul { margin: 0; font-size: .76rem; color: #475569; line-height: 1.45; }
.nxos-card ul { padding-left: 1rem; margin-top: 6px; }
.nxos-card .rec { margin-top: 10px; padding-top: 8px; border-top: 1px dashed #e2e8f0; font-size: .72rem; color: #0f6e56; }
.nxos-mock-note { color: #92400e !important; font-weight: 600; margin-top: 6px !important; }
.nxos-limits {
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: 14px; margin-top: 16px;
  font-size: .8rem; color: #78350f; line-height: 1.5;
}
.nxos-limits strong { color: #92400e; }
#nxos-errors { white-space: pre-wrap; }
#nx-status-bar {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  max-width: 55%; font-size: .65rem; font-weight: 600; color: rgba(255,255,255,.9);
}
#nx-status-bar .nxos-pill { font-size: .62rem; padding: 2px 8px; }
@media (max-width: 900px) { #nx-status-bar { display: none; } }

/* Dark theme */
:root:not([data-theme="light"]) #page-nexora-os .nxos-head h1 { color: var(--nero, #e2e8f0); }
:root:not([data-theme="light"]) #page-nexora-os .nxos-head p { color: var(--g2, #94a3b8); }
:root:not([data-theme="light"]) #page-nexora-os .nxos-status-bar { background: var(--card, #1e293b); border-color: var(--g3, #334155); }
:root:not([data-theme="light"]) #page-nexora-os .nxos-flow { background: var(--card, #1e293b); border-color: var(--g3, #334155); }
:root:not([data-theme="light"]) #page-nexora-os .nxos-flow-step { background: #0f172a; border-color: #334155; }
:root:not([data-theme="light"]) #page-nexora-os .nxos-flow-step h3 { color: #e2e8f0; }
:root:not([data-theme="light"]) #page-nexora-os .nxos-flow-step p { color: #94a3b8; }
:root:not([data-theme="light"]) #page-nexora-os .nxos-card { background: var(--card, #1e293b); border-color: var(--g3, #334155); }
:root:not([data-theme="light"]) #page-nexora-os .nxos-card-h strong { color: #e2e8f0; }
:root:not([data-theme="light"]) #page-nexora-os .nxos-card p,
:root:not([data-theme="light"]) #page-nexora-os .nxos-card ul { color: #cbd5e1; }
:root:not([data-theme="light"]) #page-nexora-os .nxos-btn { background: #0f172a; border-color: #334155; color: #e2e8f0; }
:root:not([data-theme="light"]) #page-nexora-os .nxos-handoff { background: linear-gradient(135deg, #0f172a, #134e4a); border-color: #115e59; }
:root:not([data-theme="light"]) #page-nexora-os .nxos-handoff h2,
:root:not([data-theme="light"]) #page-nexora-os .nxos-handoff-section-title { color: #5eead4; }
:root:not([data-theme="light"]) #page-nexora-os .nxos-handoff-meta { color: #94a3b8; }
:root:not([data-theme="light"]) #page-nexora-os .nxos-handoff-card,
:root:not([data-theme="light"]) #page-nexora-os .nxos-handoff-step,
:root:not([data-theme="light"]) #page-nexora-os .nxos-handoff-env .e { background: #0f172a; border-color: #334155; color: #e2e8f0; }
:root:not([data-theme="light"]) #page-nexora-os .nxos-handoff-card h4 { color: #5eead4; }
:root:not([data-theme="light"]) #page-nexora-os .nxos-muted { color: #94a3b8; }
:root:not([data-theme="light"]) #page-nexora-os .nxos-handoff-docs { color: #94a3b8; }
:root:not([data-theme="light"]) #page-nexora-os .nxos-handoff .dg-vai { background: #134e4a; border-color: #115e59; color: #99f6e4; }
:root:not([data-theme="light"]) #page-nexora-os .nxos-limits { background: #422006; border-color: #92400e; color: #fde68a; }
:root:not([data-theme="light"]) #page-nexora-os .nxos-limits strong { color: #fcd34d; }

.nxos-fs-section { margin-top: 16px; }
.nxos-fs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 900px) { .nxos-fs-grid { grid-template-columns: 1fr; } }
.nxos-fs-host {
  background: #fff; border: 1px solid #cbd5e1; border-radius: 10px; padding: 12px;
  font-size: .74rem; max-height: 520px; overflow: auto;
}
.nxos-fs-host.nxos-fs-current { border-color: #0d9488; box-shadow: 0 0 0 1px #99f6e4; }
.nxos-fs-host.nxos-fs-off { opacity: .85; border-style: dashed; }
.nxos-fs-host-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.nxos-fs-badge { font-size: .62rem; background: #ccfbf1; color: #0f766e; padding: 1px 6px; border-radius: 999px; font-weight: 700; }
.nxos-fs-src { font-size: .62rem; color: #64748b; }
.nxos-fs-path { font-size: .68rem; word-break: break-all; margin-bottom: 4px; }
.nxos-fs-host-meta { font-size: .66rem; color: #94a3b8; margin-bottom: 8px; }
.nxos-fs-list, .nxos-fs-sub, .nxos-fs-files { margin: 0; padding-left: 1.1rem; line-height: 1.45; }
.nxos-fs-sub { margin-top: 4px; font-size: .7rem; }
.nxos-fs-dir { font-weight: 700; color: #0f766e; }
.nxos-fs-meta { color: #64748b; font-size: .66rem; }
.nxos-fs-recent { margin: 3px 0 6px 0; line-height: 1.35; }
.nxos-fs-file { display: inline-block; background: #f1f5f9; border-radius: 4px; padding: 1px 5px; margin: 2px 2px 0 0; font-size: .64rem; font-family: var(--mono, monospace); }
.nxos-fs-files-title { font-weight: 700; margin-top: 8px; font-size: .68rem; color: #475569; }
.nxos-fs-writable { margin-top: 8px; font-size: .64rem; }
.nxos-fs-w.ok { color: #059669; font-weight: 700; }
.nxos-fs-w.no { color: #dc2626; font-weight: 700; }
.nxos-fs-err { color: #b45309; margin: 8px 0 0; font-size: .72rem; }
:root:not([data-theme="light"]) .nxos-fs-host { background: #0f172a; border-color: #334155; }
:root:not([data-theme="light"]) .nxos-fs-dir { color: #5eead4; }
:root:not([data-theme="light"]) .nxos-fs-file { background: #1e293b; color: #cbd5e1; }
