/* ── Variables y reset ─────────────────────────────────────────────────────────*/
:root {
  --bg:       #0b0f19;
  --panel:    #111827;
  --panel-2:  #1f2937;
  --panel-3:  #374151;
  --border:   #374151;
  --text:     #f3f4f6;
  --text-2:   #9ca3af;
  --primary:  #3b82f6;
  --primary-2:#2563eb;
  --success:  #10b981;
  --warning:  #f59e0b;
  --danger:   #ef4444;
  --radius:   10px;
  --shadow:   0 4px 12px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

/* ── Login ─────────────────────────────────────────────────────────────────────*/
.login-overlay {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background:
    linear-gradient(rgba(11, 15, 25, .82), rgba(11, 15, 25, .88)),
    url('/img/fondo.jpg') center/cover no-repeat;
}
.login-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 420px;
  box-shadow: var(--shadow);
}
.login-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.login-logo {
  width: 56px; height: 56px; border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.login-brand h1 { margin: 0; font-size: 22px; }
.login-brand p { margin: 4px 0 0; color: var(--text-2); font-size: 13px; }
.login-error { color: var(--danger); font-size: 13px; min-height: 20px; }
.login-footer { text-align: center; color: var(--text-2); font-size: 12px; margin-top: 24px; }

/* ── Layout ────────────────────────────────────────────────────────────────────*/
.app { display: flex; height: 100vh; }
.sidebar {
  width: 240px;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 20px; }
.brand-logo {
  width: 40px; height: 40px; border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.brand-name { font-weight: 700; }
.brand-sub  { font-size: 11px; color: var(--text-2); }

.nav { flex: 1; padding: 0 12px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 8px;
  color: var(--text-2); text-decoration: none;
  margin-bottom: 4px; transition: .15s;
}
.nav-item:hover, .nav-item.active { background: var(--panel-2); color: var(--text); }
.nav-icon { width: 22px; text-align: center; }

.sidebar-footer { padding: 16px; border-top: 1px solid var(--border); }
.user-pill { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.user-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.user-dot.offline { background: var(--danger); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 64px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
}
.topbar h2 { margin: 0; font-size: 18px; font-weight: 600; }
.main-content { flex: 1; overflow: auto; padding: 24px; }

/* ── Elementos comunes ─────────────────────────────────────────────────────────*/
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
input, select, textarea {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); }
textarea { min-height: 120px; resize: vertical; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 8px; padding: 10px 16px;
  font-size: 13px; font-weight: 600; cursor: pointer; transition: .15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-2); }
.btn-ghost { background: transparent; color: var(--text-2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--panel-2); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.card-title { font-weight: 600; margin-bottom: 16px; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.table-wrap { overflow: auto; }
table {
  width: 100%; border-collapse: collapse;
}
th, td {
  text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
th { color: var(--text-2); font-weight: 500; font-size: 12px; }

.badge {
  display: inline-flex; padding: 3px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
}
.badge-blue { background: rgba(59,130,246,.15); color: #60a5fa; }
.badge-green { background: rgba(16,185,129,.15); color: #34d399; }
.badge-amber { background: rgba(245,158,11,.15); color: #fbbf24; }
.badge-red   { background: rgba(239,68,68,.15); color: #f87171; }

.empty { color: var(--text-2); text-align: center; padding: 40px; }

/* ── Biblioteca / listados ─────────────────────────────────────────────────────*/
.doc-row { cursor: pointer; }
.doc-row:hover { background: rgba(255,255,255,.03); }
.doc-meta { color: var(--text-2); font-size: 12px; }

/* ── Chat ──────────────────────────────────────────────────────────────────────*/
.chat-container {
  display: flex; flex-direction: column; height: calc(100vh - 140px);
}
.chat-messages { flex: 1; overflow: auto; padding: 10px; }
.chat-bubble {
  max-width: 75%;
  padding: 14px 16px; border-radius: 14px; margin-bottom: 12px;
  line-height: 1.5;
}
.chat-bubble.user { background: var(--primary); align-self: flex-end; margin-left: auto; }
.chat-bubble.assistant { background: var(--panel-2); }
.chat-input {
  display: flex; gap: 10px; padding: 12px 0;
}
.chat-input textarea { flex: 1; min-height: 48px; }

/* ── Toast ─────────────────────────────────────────────────────────────────────*/
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 14px 20px;
  box-shadow: var(--shadow);
  transform: translateY(120px); transition: .25s;
  z-index: 1000;
}
.toast.show { transform: translateY(0); }

/* ── Drag & drop ────────────────────────────────────────────────────────────────*/
.doc-row { cursor: grab; }
.doc-row:active { cursor: grabbing; }
.doc-row.dragging { opacity: .5; }
.drop-zones { border: 2px dashed var(--border); }
.drop-zone {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  min-height: 120px;
  transition: .15s;
}
.drop-zone.drop-active { background: rgba(59,130,246,.15); border-color: var(--primary); }
.drop-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.drop-item {
  background: var(--panel-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: default;
}
.drop-zone .drop-item { pointer-events: none; }

/* ── Auxiliares ────────────────────────────────────────────────────────────────*/
.hidden { display: none !important; }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }

/* ── Modales / selectores ──────────────────────────────────────────────────────*/
.ui-autocomplete .ui-modal-body { min-height: 160px; }
.ui-ac-list {
  max-height: 220px; overflow: auto;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--panel-2); margin-top: 8px;
}
.ui-ac-item {
  padding: 10px 12px; cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.ui-ac-item:hover, .ui-ac-item.active { background: var(--primary); color: #fff; }

.ui-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .75);
  display: flex; align-items: center; justify-content: center;
  z-index: 3000;
}
.ui-modal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 460px; max-width: 92vw;
  box-shadow: var(--shadow);
}
.ui-modal-wide .ui-modal { width: 600px; }
.ui-modal-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.ui-modal-body { padding: 20px; max-height: 60vh; overflow: auto; }
.ui-modal-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
}
.ui-input, .ui-select {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}
.ui-input:focus, .ui-select:focus { outline: none; border-color: var(--primary); }
.ui-check-list { display: flex; flex-direction: column; gap: 8px; }
.ui-check {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: 8px; cursor: pointer;
}
.ui-check:hover { background: var(--panel-2); }
.ui-check-input { accent-color: var(--primary); }

/* ── Biblioteca en árbol (recreación desde cero tipo Finder) ────────────────────*/
.lib-layout { display: flex; gap: 10px; align-items: flex-start; }
.lib-tree-panel {
  width: 260px; flex-shrink: 0;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 14px;
  margin-bottom: 0;
}
.lib-tree-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-bottom: 1px solid var(--border);
  font-weight: 600; font-size: 12px; color: var(--text-2);
  letter-spacing: .04em; text-transform: uppercase;
}
.lib-tree { padding: 6px 4px; max-height: calc(100vh - 260px); overflow: auto; }
.lib-tree ul {
  list-style: none; margin: 0; padding-left: 20px;
}
.lib-tree > ul { padding-left: 0; }
.lib-tree li { margin: 4px 0; position: relative; }
.lib-main { flex: 1; min-width: 0; }

.lib-folder {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px; border-radius: 6px; cursor: pointer;
  user-select: none; transition: background 0.15s;
  min-width: 0;
}
.lib-folder:hover { background: rgba(59,130,246,.15); }
.lib-folder.active { background: var(--primary); color: #fff; }
.lib-folder.active .lib-toggle { color: #fff; }

.lib-toggle {
  flex: 0 0 18px;
  width: 18px; height: 18px; min-width: 18px; min-height: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--text-2);
  transition: transform 0.2s;
  overflow: hidden;
}
.lib-folder.collapsed .lib-toggle { transform: rotate(-90deg); }
.lib-toggle.empty { visibility: hidden; opacity: 0; }

.lib-folder-icon {
  flex: 0 0 18px;
  width: 18px; height: 18px; min-width: 18px; min-height: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  overflow: hidden;
}
.lib-folder-name {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 14px; line-height: 18px;
}
.lib-folder-count {
  font-size: 12px; color: var(--text-2); flex-shrink: 0; min-width: 18px; text-align: right;
}
.lib-folder.active .lib-folder-count { color: rgba(255,255,255,.7); }

.lib-folder-actions {
  display: none; gap: 4px; flex-shrink: 0;
}
.lib-folder:hover .lib-folder-actions { display: flex; }
.lib-folder-actions button {
  background: transparent; border: none; color: inherit; cursor: pointer;
  font-size: 12px; padding: 2px 4px; border-radius: 3px; line-height: 1;
}
.lib-folder-actions button:hover { background: rgba(128,128,128,.25); }

/* Colapsar hijos */
.lib-folder.collapsed + ul { display: none; }

/* Drag & drop */
.lib-folder.drop-active { outline: 1.5px dashed var(--primary); outline-offset: -2px; background: rgba(59,130,246,.12); }
.lib-folder.drag-over-files { background: rgba(16,185,129,.22); }
.lib-folder.drag-over-files .lib-folder-icon,
.lib-folder.drag-over-files .lib-folder-name { color: var(--success); }
.lib-upload-bar {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 10px 12px; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 10px; font-size: 13px;
}
.lib-upload-bar label { color: var(--text-2); font-size: 12px; white-space: nowrap; }
.lib-upload-bar input[type=file] { font-size: 12px; flex: 1; min-width: 120px; }
.lib-upload-bar select { font-size: 12px; }
.lib-doc-path { color: var(--text-2); font-size: 11px; }
.lib-doc-dropzone { transition: .15s; }
.lib-doc-dropzone.drop-active { outline: 2px dashed var(--primary); outline-offset: -2px; background: rgba(59,130,246,.08); }

/* ── Light theme ───────────────────────────────────────────────────────────────*/
[data-theme="light"] {
  --bg:       #f3f4f6;
  --panel:    #ffffff;
  --panel-2:  #f9fafb;
  --panel-3:  #e5e7eb;
  --border:   #d1d5db;
  --text:     #111827;
  --text-2:   #6b7280;
  --shadow:   0 4px 12px rgba(0,0,0,.08);
}
[data-theme="light"] .login-overlay { background: linear-gradient(rgba(255,255,255,.9), rgba(255,255,255,.95)), url('/img/fondo.jpg') center/cover no-repeat; }

/* ── Theme toggle ──────────────────────────────────────────────────────────────*/
.theme-toggle {
  background: transparent; border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 12px; color: var(--text); cursor: pointer; font-size: 16px;
}

/* ── Chat rediseñado ───────────────────────────────────────────────────────────*/
.chat-card {
  display: flex; flex-direction: column;
  height: calc(100vh - 220px); min-height: 420px;
}
.chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.chat-messages {
  flex: 1; overflow: auto; padding: 18px;
  display: flex; flex-direction: column; gap: 14px;
  scroll-behavior: smooth;
}
.chat-bubble {
  max-width: 85%;
  padding: 14px 18px; border-radius: 18px;
  line-height: 1.6; word-wrap: break-word;
}
.chat-bubble.user {
  background: var(--primary); color: #fff; align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-bubble.assistant {
  background: var(--panel-2); color: var(--text); align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.chat-bubble h1,.chat-bubble h2,.chat-bubble h3 { margin: 0 0 10px; }
.chat-bubble h1 { font-size: 18px; }
.chat-bubble h2 { font-size: 16px; }
.chat-bubble h3 { font-size: 15px; }
.chat-bubble p { margin: 0 0 10px; }
.chat-bubble p:last-child { margin-bottom: 0; }
.chat-bubble ul, .chat-bubble ol { margin: 0 0 10px; padding-left: 20px; }
.chat-bubble li { margin-bottom: 4px; }
.chat-bubble code {
  background: rgba(128,128,128,.18); padding: 2px 6px; border-radius: 4px; font-family: monospace; font-size: 13px;
}
.chat-bubble pre {
  background: var(--panel-3); padding: 12px; border-radius: 8px; overflow: auto; font-size: 13px;
}
.chat-bubble pre code { background: none; padding: 0; }
.chat-bubble strong { font-weight: 600; }
.chat-bubble a { color: var(--primary); text-decoration: none; }
.chat-bubble a:hover { text-decoration: underline; }
.chat-bubble blockquote { border-left: 3px solid var(--primary); padding-left: 12px; margin: 0 0 10px; color: var(--text-2); }
.chat-source-snippet {
  white-space: pre-wrap; background: var(--panel); color: var(--text);
  padding: 12px; border-radius: 8px; border: 1px solid var(--border);
  max-height: 320px; overflow: auto; font-size: 13px; line-height: 1.55;
}
.chat-table {
  width: 100%; border-collapse: collapse; margin: 0 0 12px; font-size: 13px;
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.chat-table th, .chat-table td {
  border: 1px solid var(--border); padding: 7px 10px; text-align: left; vertical-align: top;
}
.chat-table th { background: rgba(59,130,246,.18); font-weight: 600; }
.chat-table tr:nth-child(even) { background: rgba(128,128,128,.06); }
.chat-md br { display: block; content: ""; margin-bottom: 4px; }
.chat-md ul, .chat-md ol {
  margin: 0 0 12px 20px; padding: 0; list-style-position: outside;
}
.chat-md li { margin: 0 0 6px; line-height: 1.5; }
.chat-chart-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 220px;
  margin: 12px 0;
  box-sizing: border-box;
  overflow: hidden;
}
.chat-chart-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
}
.chat-sources {
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-2);
}
.chat-source { display: inline-block; margin: 2px 4px; color: var(--primary); }
.chat-feedback {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px;
  font-size: 13px;
}
.chat-feedback button {
  background: transparent; border: 1px solid var(--border); border-radius: 6px;
  padding: 4px 8px; color: var(--text-2); cursor: pointer;
  transition: .15s; font-size: 14px;
}
.chat-feedback button:hover { border-color: var(--primary); color: var(--text); }
.chat-feedback button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chat-feedback-count { font-size: 11px; color: var(--text-2); }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 10px; }
.chat-suggestion {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 20px;
  padding: 6px 14px; font-size: 12px; cursor: pointer;
}
.chat-suggestion:hover { border-color: var(--primary); }
.chat-toolbar {
  display: flex; gap: 8px; padding: 8px 18px; border-top: 1px solid var(--border);
  background: var(--panel); flex-wrap: wrap; align-items: center;
}
.chat-toolbar button { font-size: 12px; }
.chat-input-bar {
  display: flex; gap: 10px; align-items: flex-end;
  padding: 12px 18px; border-top: 1px solid var(--border); background: var(--panel);
}
.chat-input-bar textarea {
  flex: 1; min-height: 48px; max-height: 160px; resize: none; overflow: auto;
}
.chat-input-bar .btn { height: 48px; padding: 0 20px; }

.chat-share { padding: 24px; max-width: 960px; margin: 0 auto; }
.chat-share h2 { margin: 0 0 18px; }
.chat-share-messages {
  display: flex; flex-direction: column; gap: 14px;
  background: var(--panel); border-radius: 12px; padding: 20px;
  border: 1px solid var(--border); min-height: 300px;
}
.chat-share-messages .chat-bubble { max-width: 90%; }

/* Impresión / PDF del chat */
@media print {
  body > *:not(.chat-overlay) { display: none !important; }
  .chat-overlay {
    position: static; inset: auto; z-index: auto;
    background: #fff; color: #000;
    height: auto; overflow: visible;
    page-break-inside: avoid;
  }
  .chat-overlay-body { overflow: visible; height: auto; }
  .chat-overlay-messages { overflow: visible; height: auto; padding: 20px; gap: 14px; }
  .chat-overlay-sessions, .chat-toolbar, .chat-input-bar, .chat-overlay-head .btn, .session-list-head { display: none !important; }
  .chat-bubble { max-width: 100%; border: 1px solid #ccc; page-break-inside: avoid; }
  .chat-bubble.user { background: #f0f4ff !important; color: #000 !important; }
  .chat-bubble.assistant { background: #f7f7f7 !important; color: #000 !important; }
  .chat-table th, .chat-table td { border: 1px solid #999; }
  .chat-table th { background: #e6efff !important; }
  a { color: #000 !important; text-decoration: underline; }
}

/* ── Session list ──────────────────────────────────────────────────────────────*/
.session-list {
  width: 220px; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; background: var(--panel);
}
.session-list-head {
  padding: 12px 14px; border-bottom: 1px solid var(--border); font-weight: 600;
  display: flex; justify-content: space-between; align-items: center;
}
.session-item {
  padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--text-2);
}
.session-item:hover, .session-item.active { background: var(--panel-2); color: var(--text); }
.session-item-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.session-item-meta { font-size: 11px; color: var(--text-2); }
.chat-with-sessions { display: flex; flex-direction: row; height: 100%; }

/* ── Upload progress ───────────────────────────────────────────────────────────*/
.progress-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.65);
  display: flex; align-items: center; justify-content: center;
  z-index: 3000;
}
.progress-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  width: 420px; max-width: 90vw; padding: 28px; box-shadow: var(--shadow);
  text-align: center;
}
.progress-title { font-size: 16px; font-weight: 600; margin-bottom: 20px; }
.progress-bar-wrap { background: var(--panel-2); border-radius: 20px; height: 12px; overflow: hidden; margin-bottom: 16px; }
.progress-bar { background: var(--primary); height: 100%; width: 0%; border-radius: 20px; transition: width .3s; }
.progress-steps { text-align: left; font-size: 13px; color: var(--text-2); }
.progress-step { padding: 6px 0; display: flex; align-items: center; gap: 8px; }
.progress-step.done { color: var(--success); }
.progress-step.active { color: var(--text); font-weight: 500; }

/* ── Viewer rediseñado ─────────────────────────────────────────────────────────*/
.viewer-modal .ui-modal { width: 92vw; max-width: 1200px; }
.viewer-body { display: flex; gap: 20px; height: 70vh; }
.viewer-main { flex: 1; overflow: auto; background: var(--panel-2); border-radius: 10px; }
.viewer-sidebar { width: 260px; display: flex; flex-direction: column; gap: 14px; }
.viewer-notes { flex: 1; overflow: auto; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 14px; }
.viewer-note { padding: 10px 0; border-bottom: 1px solid var(--border); }
.viewer-note:last-child { border-bottom: 0; }
.viewer-thumb-strip { display: flex; gap: 8px; overflow: auto; padding: 8px; }
.viewer-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 2px solid transparent; cursor: pointer; }
.viewer-thumb.active { border-color: var(--primary); }

/* ── Project detail ────────────────────────────────────────────────────────────*/
.project-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.project-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.project-section { margin-bottom: 20px; }
.project-prompt {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px; color: var(--text-2); font-size: 13px; white-space: pre-wrap;
}

/* ── Full-screen chat overlay ──────────────────────────────────────────────────*/
.chat-overlay {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 2500;
  display: flex; flex-direction: column;
}
.chat-overlay-head {
  height: 64px; background: var(--panel); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
}
.chat-overlay-body {
  flex: 1; display: flex; overflow: hidden;
}
.chat-overlay-sessions {
  width: 280px; border-right: 1px solid var(--border); background: var(--panel);
  display: flex; flex-direction: column; overflow: hidden;
}
.chat-overlay-main {
  flex: 1; display: flex; flex-direction: column; min-width: 0;
}
.chat-overlay-messages {
  flex: 1; overflow: auto; padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
}

/* ── Session list fixed ────────────────────────────────────────────────────────*/
.session-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; cursor: pointer; border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--text-2);
}
.session-item:hover, .session-item.active { background: var(--panel-2); color: var(--text); }
.session-item-info { flex: 1; min-width: 0; }
.session-item-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.session-item-meta { font-size: 11px; color: var(--text-2); }
.session-item-del {
  background: transparent; border: 0; color: var(--danger);
  font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px;
}
.session-item-del:hover { color: var(--danger); opacity: .8; }

/* ── Full-screen viewer ────────────────────────────────────────────────────────*/
.viewer-modal .ui-modal {
  width: 98vw; height: 96vh; max-width: none;
  display: flex; flex-direction: column;
}
.viewer-modal .ui-modal-body { flex: 1; overflow: hidden; max-height: none; }
.viewer-modal .ui-modal-foot { flex: 0; }
.viewer-body { display: flex; gap: 20px; height: 100%; }
.viewer-main { flex: 1; overflow: auto; background: var(--panel-2); border-radius: 10px; }
.viewer-sidebar { width: 300px; display: flex; flex-direction: column; gap: 14px; }
.viewer-notes { flex: 1; overflow: auto; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 14px; }
.viewer-note { padding: 10px 0; border-bottom: 1px solid var(--border); }
.viewer-note:last-child { border-bottom: 0; }
.viewer-note-page { font-size: 11px; color: var(--primary); margin-bottom: 4px; }
.viewer-note-text { font-size: 12px; color: var(--text-2); font-style: italic; margin-bottom: 4px; }
.viewer-note-note { font-size: 13px; }

/* ── Búsqueda global / Cmd+K ───────────────────────────────────────────────────*/
.search-trigger {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  transition: .15s;
}
.search-trigger:hover { border-color: var(--primary); color: var(--text); }
.search-trigger kbd {
  font-family: inherit;
  font-size: 11px;
  padding: 2px 5px;
  background: var(--panel-3);
  border-radius: 4px;
}

#search-modal.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .75);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 12vh;
  z-index: 3000;
}
.search-modal-card {
  width: 720px; max-width: 92vw;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex; flex-direction: column;
  max-height: 80vh;
}
.search-input-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-2);
}
.search-input-wrap .search-icon { font-size: 16px; color: var(--text-2); }
.search-input {
  flex: 1;
  background: transparent; border: none;
  color: var(--text); font-size: 16px;
  outline: none;
}
.search-input::placeholder { color: var(--text-2); }
.search-hint {
  font-size: 12px; color: var(--text-2);
  white-space: nowrap;
}
.search-mode-bar {
  display: flex; justify-content: flex-end; align-items: center;
  padding: 8px 18px 0;
  border-bottom: 1px solid var(--border);
}
.search-mode-switch {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-2);
  cursor: pointer;
  user-select: none;
}
.search-mode-switch input[type="checkbox"] {
  appearance: none; width: 36px; height: 18px;
  background: var(--panel-3); border-radius: 10px;
  position: relative; outline: none; cursor: pointer;
  transition: .15s;
}
.search-mode-switch input[type="checkbox"]::after {
  content: ''; position: absolute;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--text-2); top: 2px; left: 2px;
  transition: .15s;
}
.search-mode-switch input[type="checkbox"]:checked {
  background: var(--primary);
}
.search-mode-switch input[type="checkbox"]:checked::after {
  left: 20px; background: #fff;
}
.search-mode-switch input[type="checkbox"]:checked + .search-mode-label {
  color: var(--primary);
}
.search-connector-bar {
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.search-connector-list {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.search-connector-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 20px;
  padding: 4px 10px; cursor: pointer; user-select: none;
}
.search-connector-pill input { margin: 0; cursor: pointer; }
.search-results {
  overflow: auto;
  padding: 12px 0;
}
.search-section { margin-bottom: 12px; }
.search-section-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: .6px;
  color: var(--primary);
  padding: 0 18px 6px;
}
.search-answer {
  background: var(--panel-2);
  border-left: 3px solid var(--primary);
  padding: 12px 18px;
  margin: 0 18px 16px;
  border-radius: 8px;
  font-size: 14px; line-height: 1.55;
}
.search-answer-title {
  font-size: 11px; color: var(--primary);
  text-transform: uppercase; letter-spacing: .5px;
  margin-bottom: 8px;
}
.search-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 18px;
  cursor: pointer;
  transition: .12s;
}
.search-item:hover { background: var(--panel-2); }
.search-item-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel-3);
  font-size: 14px; flex-shrink: 0;
}
.search-item-body { flex: 1; min-width: 0; }
.search-item-title {
  font-weight: 500; font-size: 14px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.search-item-sub {
  font-size: 12px; color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.search-item-meta {
  font-size: 11px; color: var(--text-2);
  margin-top: 2px;
}
.search-empty {
  padding: 32px 18px; text-align: center;
  color: var(--text-2); font-size: 14px;
}

/* ── Business Chat ──────────────────────────────────────────────────────────── */
.business-chat-wrap { --chat-sidebar: 260px; }
.business-chat-sidebar { transition: width .25s, padding .25s; }
.business-chat-sidebar.collapsed { width: 54px; padding: 0; overflow: hidden; }
.business-chat-sidebar.collapsed #businesschat-sessions,
.business-chat-sidebar.collapsed #businesschat-refresh,
.business-chat-sidebar.collapsed .card-title { display: none; }
.business-chat-sidebar.collapsed #businesschat-toggle-sidebar { margin: 10px auto; }
.business-session { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.business-session:hover { background: var(--panel-3); }
.business-session.active { background: rgba(59,130,246,.12); }
.business-session-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.business-chat-messages { scroll-behavior: smooth; }
.business-chat-bubble { box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.business-chat-bubble.user { border-bottom-right-radius: 4px; }
.business-chat-bubble.assistant { border-bottom-left-radius: 4px; }
.chat-md { font-size: 14.5px; line-height: 1.7; }
.chat-md h1, .chat-md h2, .chat-md h3, .chat-md h4 { margin: 14px 0 8px; font-weight: 600; }
.chat-md h1 { font-size: 20px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.chat-md h2 { font-size: 17px; color: var(--primary); }
.chat-md p { margin: 8px 0; }
.chat-md ul, .chat-md ol { margin: 8px 0; padding-left: 20px; }
.chat-md li { margin: 4px 0; }
.chat-md table { border-collapse: collapse; font-size: 13px; margin: 10px 0; width: 100%; }
.chat-md th, .chat-md td { border: 1px solid var(--border); padding: 7px 10px; text-align: left; }
.chat-md th { background: var(--panel); font-weight: 600; }
.chat-md code { background: rgba(255,255,255,.08); padding: 2px 5px; border-radius: 4px; font-family: monospace; }
.chat-md pre { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px; overflow: auto; }
.chat-md pre code { background: none; padding: 0; }
.chat-md blockquote { border-left: 3px solid var(--primary); padding-left: 12px; color: var(--text-2); margin: 10px 0; }
.chat-source-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 3px 8px; border-radius: 20px; background: var(--panel); color: var(--text-2); border: 1px solid var(--border); }
.chat-source-chip-web { border-color: #22c55e44; background: color-mix(in srgb, #22c55e 8%, transparent); color: #16a34a; }
.dark .chat-source-chip-web { color: #4ade80; }
.business-chat-config { background: var(--panel-2); }
.business-chat-config .form-field label { display: block; margin-bottom: 4px; }

/* ── Fuentes colapsables en chats ───────────────────────────────────────────── */
.chat-sources-details { margin-top: 10px; }
.chat-sources-summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--text-2);
  user-select: none;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chat-sources-summary::-webkit-details-marker { display: none; }
.chat-sources-summary::before {
  content: '▸';
  font-size: 10px;
  color: var(--primary);
}
.chat-sources-details[open] > .chat-sources-summary::before { content: '▾'; }
.chat-source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  align-items: center;
}
.chat-source-list .chat-source,
.chat-source-list .chat-source-chip {
  font-size: 12px;
}

/* ── Fragmentos de documentos colapsables ───────────────────────────────────── */
.chat-fragment-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.chat-fragment-details {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}
.chat-fragment-summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  padding: 8px 12px;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-fragment-summary::-webkit-details-marker { display: none; }
.chat-fragment-summary::before {
  content: '▸';
  font-size: 10px;
  color: var(--primary);
  flex-shrink: 0;
}
.chat-fragment-details[open] > .chat-fragment-summary::before { content: '▾'; }
.chat-fragment-content {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-1);
  padding: 10px 12px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  max-height: 260px;
  overflow-y: auto;
}

/* ── Sprint 303: Traza de razonamiento (estilo Grok/Claude thinking) ─────────── */

/* Indicador vivo durante el streaming */
.chat-trace-live { margin: 6px 0 4px; min-height: 30px; }
.trace-live-row {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-muted);
  padding: 6px 12px; border-radius: 20px;
  background: var(--panel-2); border: 1px solid var(--border);
  max-width: 100%; overflow: hidden;
}
.trace-live-spinner {
  flex-shrink: 0; width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--primary); border-right-color: var(--primary);
  animation: trace-spin 0.7s linear infinite;
}
@keyframes trace-spin { to { transform: rotate(360deg); } }
.trace-live-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.trace-live-count { flex-shrink: 0; font-size: 11px; color: var(--primary); opacity: 0.8; }

/* Panel colapsable post-respuesta */
.chat-trace-wrapper { margin-bottom: 14px; }
.chat-trace { }
.chat-trace-summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px 7px 10px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--border);
  font-size: 12px; font-weight: 500; color: var(--text-2);
  user-select: none; transition: background 0.15s;
}
.chat-trace-summary:hover { background: var(--panel-3, rgba(255,255,255,0.07)); }
.chat-trace-summary::-webkit-details-marker { display: none; }
.chat-trace[open] > .chat-trace-summary { border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; }
.chat-trace-summary::after { content: '▸'; font-size: 10px; color: var(--text-muted); margin-left: auto; }
.chat-trace[open] > .chat-trace-summary::after { content: '▾'; }
.chat-trace-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary); flex-shrink: 0;
}
.chat-trace-title { flex: 1; }
.chat-trace-stats { font-size: 11px; color: var(--text-muted); font-weight: 400; }
.chat-trace-body {
  display: flex; flex-direction: column; gap: 2px;
  padding: 6px 4px 4px 14px;
  border-left: 2px solid var(--border);
  margin: 4px 0 0 14px;
}
.trace-step {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; padding: 3px 8px; border-radius: 6px; color: var(--text-2);
}
.trace-step:hover { background: var(--panel-2); }
.trace-step-status { font-size: 11px; font-weight: 700; flex-shrink: 0; width: 12px; text-align: center; }
.trace-step-done .trace-step-status  { color: #22c55e; }
.trace-step-error .trace-step-status { color: var(--danger, #dc2626); }
.trace-step-pending .trace-step-status { color: var(--text-muted); }
.trace-step-emoji  { flex-shrink: 0; font-size: 13px; }
.trace-step-name   { font-weight: 500; }
.trace-step-detail { color: var(--text-muted); font-size: 11px; margin-left: 4px; flex: 1; }
.trace-step-time   { color: var(--text-muted); font-size: 11px; margin-left: auto; flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* ── Sprint 301: galería inline de imágenes en la burbuja del chat ─────────── */
.chat-inline-images { margin: 12px 0 4px; }
.chat-inline-images-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chat-inline-img-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  background: var(--panel, var(--bg));
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  max-width: 180px;
}
.chat-inline-img-item:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}
.chat-inline-img-item img {
  width: 160px;
  height: 120px;
  object-fit: contain;
  border-radius: 6px;
  background: var(--bg);
  display: block;
}
.chat-inline-img-name {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Búsqueda: fragmentos colapsables ───────────────────────────────────────── */
.search-chunk-details { margin-top: 6px; }
.search-chunk-summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--primary);
  user-select: none;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.search-chunk-summary::-webkit-details-marker { display: none; }
.search-chunk-summary::before {
  content: '▸';
  font-size: 10px;
  color: var(--primary);
}
.search-chunk-details[open] > .search-chunk-summary::before { content: '▾'; }
.search-chunk-content {
  margin-top: 8px;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
}
@media (max-width: 800px) {
  .business-chat-wrap { flex-direction: column; height: auto; }
  .business-chat-sidebar { width: 100% !important; height: 180px; }
  .business-chat-sidebar.collapsed { height: 40px; }
  .business-chat-main { min-height: 500px; }
  .business-chat-topbar { flex-direction: column; align-items: flex-start; }
}

/* ── Responsive móvil y tableta ──────────────────────────────────────────────── */

/* Tableta (pantallas medianas) */
@media (max-width: 1024px) {
  .main-content { padding: 18px; }
  .card { padding: 16px; }
  .topbar { padding: 0 16px; }
  .login-card { width: 92%; max-width: 420px; padding: 28px; }
}

.menu-toggle { display: none; }

/* Móvil y pantallas pequeñas */
@media (max-width: 768px) {
  /* Sidebar off-canvas */
  .sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    bottom: 0;
    width: 260px;
    z-index: 1000;
    transition: left .25s ease;
    box-shadow: none;
  }
  .sidebar.open { left: 0; box-shadow: 4px 0 16px rgba(0,0,0,.4); }
  .sidebar-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 999; display: none;
  }
  .sidebar.open ~ .sidebar-backdrop { display: block; }

  .menu-toggle {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 38px; height: 38px;
    background: transparent; border: 1px solid var(--border); border-radius: 8px;
    color: var(--text); font-size: 20px; cursor: pointer;
    margin-right: 10px;
  }

  .main { width: 100%; }
  .main-content { padding: 14px; }

  .topbar {
    height: 58px;
    padding: 0 14px;
    gap: 8px;
  }
  .topbar h2 { font-size: 16px; flex: 1; }
  .topbar-actions { gap: 8px; }
  .search-trigger span { display: none; }
  .search-trigger kbd { display: none; }
  .search-trigger::before { content: '⌕'; font-size: 18px; }
  .theme-toggle { padding: 8px; }

  .nav { overflow: auto; }
  .nav-item { padding: 13px 16px; }

  .card { padding: 14px; border-radius: 10px; }
  .card-title { font-size: 15px; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  .form-field { margin-bottom: 14px; }
  .form-field label { font-size: 12px; }
  input, select, textarea { padding: 10px; font-size: 16px; }
  .btn { padding: 10px 14px; font-size: 13px; }

  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { font-size: 12px; }
  th, td { padding: 8px 10px; }

  .ui-modal {
    width: 96vw;
    border-radius: 10px;
  }
  .ui-modal-body { padding: 16px; }
  .ui-modal-foot { padding: 12px 16px; }

  .viewer-modal .ui-modal {
    width: 100vw; height: 100vh;
    max-width: none; border-radius: 0;
  }
  .viewer-body { flex-direction: column; height: 100%; gap: 12px; }
  .viewer-main { height: 60vh; }
  .viewer-sidebar { width: 100%; height: auto; }

  .search-modal-card { width: 96vw; }
  .search-input { width: 100%; }

  .login-card { width: 92%; max-width: 380px; padding: 24px; }
  .login-brand h1 { font-size: 20px; }

  .business-chat-wrap { height: calc(100vh - 110px); min-height: auto; }
  .business-chat-main { padding: 12px; }
  .business-chat-input { padding: 12px; }
  .business-chat-input textarea { font-size: 16px; }
}

/* Móvil muy pequeño */
@media (max-width: 480px) {
  .main-content { padding: 10px; }
  .topbar { height: 54px; padding: 0 10px; }
  .topbar h2 { font-size: 14px; }
  .card { padding: 12px; }
  .btn { padding: 8px 12px; font-size: 12px; }
  .business-chat-wrap { height: calc(100vh - 100px); }
}

/* ── Cola de subidas ─────────────────────────────────────────────────────────── */
.upload-queue {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 420px;
  max-width: 92vw;
  max-height: 70vh;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.upload-queue-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--panel-2);
}
.upload-queue-head button { padding: 4px 8px; }
.upload-queue-body { padding: 10px 14px; overflow: auto; flex: 1; }
.upload-queue-foot {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  background: var(--panel-2);
}
.upload-queue-item { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.upload-queue-item:last-child { border-bottom: none; }
.upload-queue-item-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.upload-queue-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.upload-queue-status { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.upload-queue-progress { height: 6px; background: var(--panel-3); border-radius: 3px; overflow: hidden; }
.upload-queue-progress > div { height: 100%; background: var(--primary); width: 0%; transition: width .2s; }
.upload-queue-item.error .upload-queue-progress > div { background: var(--danger); }
.upload-queue-item.done .upload-queue-progress > div { background: var(--success); }
.upload-queue-ops { font-size: 11px; color: var(--text-2); }
@media (max-width: 768px) {
  .upload-queue { right: 10px; bottom: 10px; width: calc(100vw - 20px); max-height: 60vh; }
}

/* ── Secciones colapsables de conectores ──────────────────────────────────────*/
.connector-details > summary {
  list-style: none;
  user-select: none;
}
.connector-details > summary::-webkit-details-marker { display: none; }
.connector-details[open] > summary .connector-chevron { content: '−'; }
.connector-details > summary .connector-chevron::before { content: '+'; }
.connector-details[open] > summary .connector-chevron::before { content: '−'; }
.connector-details > summary input[type="checkbox"] { cursor: pointer; }
