/* ================================================================
   LYRA — CORE FLOW (user app) shared styles
   builds on ../css/lyra.css tokens
   ================================================================ */

.app-shell { display: flex; height: 100vh; overflow: hidden; background: var(--bg); }

/* ── SIDEBAR ─────────────────────────────────────────────── */
.side { width: 280px; flex-shrink: 0; display: flex; flex-direction: column; padding: 22px 18px; border-right: 1px solid var(--border); overflow-y: auto; }
.side-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; padding: 0 4px; }
.side-logo img { width: 32px; height: 32px; object-fit: contain; }
.side-logo span { font-size: 22px; font-weight: 500; color: var(--text); }
.side-newbtn { display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: #0A1A12; border: none; border-radius: var(--r); padding: 14px; font-family: var(--font); font-size: 14px; font-weight: 600; cursor: pointer; transition: opacity 0.15s; margin-bottom: 16px; }
.side-newbtn:hover { opacity: 0.9; }
.side-search { position: relative; margin-bottom: 24px; }
.side-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; stroke: var(--text-3); fill: none; stroke-width: 2; }
.side-search input { width: 100%; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: var(--r); padding: 11px 14px 11px 38px; font-family: var(--font); font-size: 13.5px; color: var(--text); outline: none; transition: border-color 0.15s; }
.side-search input:focus { border-color: rgba(70,253,158,0.35); }
.side-search input::placeholder { color: var(--text-3); }
.side-section { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin: 6px 4px 10px; }
.side-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--r-sm); cursor: pointer; color: var(--text-2); font-size: 13.5px; border-left: 2px solid transparent; transition: background 0.15s, color 0.15s; text-decoration: none; }
.side-item:hover { background: rgba(255,255,255,0.03); color: var(--text); }
.side-item.active { background: rgba(255,255,255,0.045); color: var(--accent); border-left-color: var(--accent); }
.side-item svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.side-item .si-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-item .si-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.side-gap { height: 26px; }
.side-foot { margin-top: auto; }
.side-lib { display: flex; align-items: center; gap: 11px; padding: 14px 14px; border-radius: var(--r); background: rgba(255,255,255,0.025); border: 1px solid var(--border); cursor: pointer; color: var(--text); font-size: 14px; text-decoration: none; margin-bottom: 12px; transition: border-color 0.15s; }
.side-lib:hover { border-color: var(--border-3); }
.side-lib.active { color: var(--accent); border-color: rgba(70,253,158,0.3); }
.side-lib svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.side-user { display: flex; align-items: center; gap: 11px; padding: 8px 6px; }
.side-user-av { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #0A1A12; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex-shrink: 0; overflow: hidden; }
.side-user-name { font-size: 13.5px; font-weight: 500; color: var(--text); }
.side-user-role { font-size: 11.5px; color: var(--accent); }

/* ── MAIN COLUMN ─────────────────────────────────────────── */
.main-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-topbar { display: flex; align-items: center; justify-content: space-between; padding: 22px 32px; flex-shrink: 0; }
.chat-title { display: flex; align-items: center; gap: 9px; font-size: 15px; color: var(--text-2); }
.chat-title .ct-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.kbd { font-size: 12px; color: var(--text-3); border: 1px solid var(--border-2); border-radius: var(--r-xs); padding: 3px 8px; }
.icon-btn { width: 34px; height: 34px; border-radius: var(--r-sm); border: 1px solid var(--border-2); background: rgba(255,255,255,0.03); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: border-color 0.15s; }
.icon-btn:hover { border-color: var(--border-3); }
.icon-btn svg { width: 16px; height: 16px; stroke: var(--text-2); fill: none; stroke-width: 1.8; }

.chat-scroll { flex: 1; overflow-y: auto; padding: 0 32px; }
.chat-inner { max-width: 880px; margin: 0 auto; padding-bottom: 20px; }

/* Empty state */
.empty-state { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 15vh; text-align: center; }
.empty-orb { width: 80px; height: 80px; margin-bottom: 12px; }
.empty-orb img { width: 100%; height: 100%; object-fit: contain; }
.empty-title { font-size: 34px; font-weight: 300; color: var(--text); letter-spacing: -0.02em; }

/* Messages */
.msg-user { display: flex; justify-content: flex-end; margin: 28px 0; }
.msg-user .bubble { background: rgba(255,255,255,0.045); border: 1px solid var(--border); border-radius: 16px 16px 4px 16px; padding: 16px 20px; font-size: 15px; color: var(--text); max-width: 70%; line-height: 1.5; }
.msg-lyra { margin: 28px 0; }
.msg-lyra-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.msg-lyra-head img { width: 26px; height: 26px; }
.msg-lyra-head span { font-size: 15px; font-weight: 500; color: var(--text); }
.ans-intro { font-size: 15px; color: var(--text); line-height: 1.6; margin-bottom: 20px; }
.ans-point { display: flex; gap: 14px; margin-bottom: 16px; }
.ans-point-n { font-size: 13px; color: var(--accent); font-weight: 500; padding-top: 2px; flex-shrink: 0; }
.ans-point-body { font-size: 15px; color: var(--text); line-height: 1.6; }
.ans-point-body b { font-weight: 600; }
sup.cite { color: var(--accent); font-size: 11px; font-weight: 600; cursor: pointer; margin-left: 2px; padding: 0 1px; }
sup.cite:hover { text-decoration: underline; }
.ans-sources { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 18px; }
.src-chip { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.03); border: 1px solid var(--border-2); border-radius: var(--r-sm); padding: 9px 14px; font-size: 13px; color: var(--text-2); cursor: pointer; transition: border-color 0.15s, color 0.15s; }
.src-chip:hover { border-color: rgba(70,253,158,0.35); color: var(--text); }
.src-chip svg { width: 14px; height: 14px; stroke: var(--text-3); fill: none; stroke-width: 1.6; }
.src-chip .src-page { color: var(--text-3); font-size: 11px; }
.ans-actions { display: flex; gap: 22px; margin-bottom: 8px; }
.ans-act { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--accent); cursor: pointer; background: none; border: none; font-family: var(--font); }
.ans-act:hover { opacity: 0.8; }
.ans-act svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; }

/* Follow-up + quick chips */
.chip-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 4px 0 16px; }
.suggest-chip { background: rgba(255,255,255,0.03); border: 1px solid var(--border-2); border-radius: 100px; padding: 12px 20px; font-family: var(--font); font-size: 13.5px; color: var(--text-2); cursor: pointer; transition: border-color 0.15s, color 0.15s; }
.suggest-chip:hover { border-color: rgba(70,253,158,0.35); color: var(--text); }
.suggest-chip svg { width: 15px; height: 15px; vertical-align: -3px; margin-right: 7px; stroke: var(--text-3); fill: none; stroke-width: 1.7; }
.qa-row { display: flex; gap: 14px; justify-content: center; margin-top: 36px; }
.qa-chip { display: inline-flex; align-items: center; gap: 9px; background: rgba(255,255,255,0.03); border: 1px solid var(--border-2); border-radius: 100px; padding: 13px 22px; font-family: var(--font); font-size: 14px; color: var(--text-2); cursor: pointer; transition: border-color 0.15s, color 0.15s; }
.qa-chip:hover { border-color: rgba(70,253,158,0.4); color: var(--text); }
.qa-chip svg { width: 16px; height: 16px; stroke: var(--text-2); fill: none; stroke-width: 1.7; }

/* ── COMPOSER ────────────────────────────────────────────── */
.composer-area { padding: 0 32px 28px; flex-shrink: 0; }
.composer-inner { max-width: 880px; margin: 0 auto; }
.composer { background: rgba(255,255,255,0.022); border: 1px solid rgba(70,253,158,0.25); border-radius: var(--r-lg); padding: 18px 20px; position: relative; }
.composer-input { width: 100%; background: none; border: none; outline: none; resize: none; font-family: var(--font); font-size: 15px; color: var(--text); line-height: 1.5; min-height: 26px; max-height: 160px; margin-bottom: 16px; }
.composer-input::placeholder { color: var(--text-3); }
.composer-bottom { display: flex; align-items: center; gap: 10px; }
.comp-plus { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border-2); background: rgba(255,255,255,0.03); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: border-color 0.15s; }
.comp-plus:hover { border-color: var(--accent); }
.comp-plus svg { width: 15px; height: 15px; stroke: var(--text-2); fill: none; stroke-width: 2; }
.kb-pill { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,0.04); border: 1px solid var(--border-2); border-radius: 100px; padding: 6px 12px; font-size: 12.5px; color: var(--text-2); cursor: pointer; transition: all 0.15s; }
.kb-pill .kbp-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.kb-pill.off { opacity: 0.5; }
.kb-pill.off .kbp-dot { background: var(--text-4); }
.kb-pill.add { border-style: dashed; color: var(--text-3); }
.kb-pill .kbp-x { width: 11px; height: 11px; stroke: var(--text-3); fill: none; stroke-width: 2.2; margin-left: 3px; cursor: pointer; }
.kb-pill .kbp-x:hover { stroke: var(--danger); }
.comp-spacer { flex: 1; }
.comp-model { font-size: 13px; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.comp-model svg { width: 12px; height: 12px; stroke: var(--text-3); fill: none; stroke-width: 2; }
.comp-attach { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.comp-attach svg { width: 17px; height: 17px; stroke: var(--text-3); fill: none; stroke-width: 1.7; }
.comp-attach:hover svg { stroke: var(--text); }
.comp-send { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: opacity 0.15s; }
.comp-send:hover { opacity: 0.9; }
.comp-send svg { width: 17px; height: 17px; stroke: #0A1A12; fill: none; stroke-width: 2.2; }

/* ── RIGHT PANELS (source / case details) ────────────────── */
.rpanel { width: 0; flex-shrink: 0; border-left: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; transition: width 0.25s ease; }
.rpanel.open { width: 540px; }
.rpanel-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; flex-shrink: 0; }
.rpanel-title { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text); white-space: nowrap; }
.rpanel-title svg { width: 16px; height: 16px; stroke: var(--accent); fill: none; stroke-width: 1.7; }
.rpanel-close { cursor: pointer; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-sm); transition: background 0.15s; }
.rpanel-close:hover { background: var(--surface-2); }
.rpanel-close svg { width: 18px; height: 18px; stroke: var(--text-3); fill: none; stroke-width: 2; }
.rpanel-body { flex: 1; overflow-y: auto; padding: 0 24px 24px; }

/* Document viewer — A4 sheet */
.doc-page { background: #f4f4f1; color: #1a1a1a; border-radius: 3px; padding: 7% 8% 8%; font-family: 'Georgia', 'Times New Roman', serif; box-shadow: 0 8px 30px rgba(0,0,0,0.4); aspect-ratio: 210 / 297; overflow: hidden; }
.doc-page h2 { font-size: 19px; margin-bottom: 4px; color: #111; font-family: var(--font); font-weight: 600; }
.doc-page .doc-meta { font-size: 11px; color: #888; margin-bottom: 22px; font-family: var(--font); letter-spacing: 0.04em; text-transform: uppercase; }
.doc-page h3 { font-size: 14px; margin: 20px 0 8px; color: #222; font-family: var(--font); font-weight: 600; }
.doc-page p { font-size: 13.5px; line-height: 1.75; color: #2a2a2a; margin-bottom: 14px; }
.doc-page .hl { background: rgba(70,200,120,0.32); box-shadow: 0 0 0 3px rgba(70,200,120,0.32); border-radius: 2px; padding: 0 1px; }
.doc-page .doc-num { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; background: #2faa5e; color: #fff; font-family: var(--font); font-size: 10px; font-weight: 700; align-items: center; justify-content: center; vertical-align: super; margin-left: 4px; }
.doc-sheet { width: 100%; border-collapse: collapse; font-family: var(--font); font-size: 12.5px; }
.doc-sheet th { background: #e6e6e2; color: #333; text-align: left; padding: 9px 12px; font-weight: 600; border: 1px solid #d2d2cc; }
.doc-sheet td { padding: 9px 12px; border: 1px solid #d8d8d2; color: #2a2a2a; }
.doc-sheet tr.hl td { background: rgba(70,200,120,0.22); }
.doc-pager { display: flex; align-items: center; justify-content: space-between; padding: 18px 0 0; font-size: 13px; color: var(--text-3); }
.doc-pager button { width: 30px; height: 30px; border-radius: var(--r-sm); border: 1px solid var(--border-2); background: rgba(255,255,255,0.03); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.doc-pager button:hover { border-color: var(--border-3); }
.doc-pager svg { width: 15px; height: 15px; stroke: var(--text-2); fill: none; stroke-width: 2; }

/* Case details panel */
.cd-label { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin: 24px 0 12px; display: flex; align-items: center; justify-content: space-between; }
.cd-label:first-child { margin-top: 0; }
.cd-add { cursor: pointer; }
.cd-add svg { width: 16px; height: 16px; stroke: var(--accent); fill: none; stroke-width: 1.8; }
.cd-tag { display: inline-block; background: rgba(255,255,255,0.05); border: 1px solid var(--border-2); border-radius: var(--r-sm); padding: 6px 12px; font-size: 13px; color: var(--text); }
.cd-kbtag { display: inline-block; background: rgba(70,253,158,0.08); border: 1px solid rgba(70,253,158,0.2); border-radius: var(--r-sm); padding: 6px 12px; font-size: 12.5px; color: var(--accent); margin: 0 8px 8px 0; }
.cd-text { font-size: 14px; color: var(--text); }
.cd-doc { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 13.5px; color: var(--text-2); }
.cd-doc svg { width: 15px; height: 15px; stroke: var(--accent); fill: none; stroke-width: 1.6; flex-shrink: 0; }
.cd-collab { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,0.04); border: 1px solid var(--border-2); border-radius: 100px; padding: 5px 12px 5px 6px; font-size: 12.5px; color: var(--text); margin: 0 8px 8px 0; }
.cd-collab-av { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--text-2); }
.cd-collab .x { color: var(--text-3); cursor: pointer; }
.cd-add-input { width: 100%; margin-top: 4px; background: rgba(255,255,255,0.04); border: 1px solid rgba(70,253,158,0.35); border-radius: var(--r-sm); padding: 9px 12px; font-family: var(--font); font-size: 13px; color: var(--text); outline: none; }
.cd-add-input::placeholder { color: var(--text-3); }
.cd-add-hint { font-size: 11px; color: var(--text-3); margin-top: 5px; }

/* ── POPOVER (connectors menu) ──────────────────────────── */
.pop { position: fixed; z-index: 200; display: none; }
.pop.open { display: block; }
.pop-menu { background: var(--surface-2); border: 1px solid var(--border-2); border-radius: var(--r); padding: 6px; min-width: 220px; box-shadow: 0 12px 40px rgba(0,0,0,0.5); }
.pop-item { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: var(--r-sm); cursor: pointer; font-size: 14px; color: var(--text-2); position: relative; }
.pop-item:hover, .pop-item.active { background: var(--surface-3); color: var(--text); }
.pop-item svg.pi { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.7; flex-shrink: 0; }
.pop-item .pi-arrow { margin-left: auto; width: 14px; height: 14px; stroke: var(--text-3); fill: none; stroke-width: 2; }
.pop-sub { background: var(--surface-2); border: 1px solid var(--border-2); border-radius: var(--r); padding: 14px; min-width: 240px; box-shadow: 0 12px 40px rgba(0,0,0,0.5); }
.pop-sub-title { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.conn-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.conn-row svg.ci { width: 18px; height: 18px; stroke: var(--text-2); fill: none; stroke-width: 1.7; }
.conn-name { flex: 1; font-size: 13.5px; color: var(--text); }
.conn-name small { display: block; font-size: 11px; color: var(--text-3); }
.toggle { width: 38px; height: 22px; border-radius: 100px; background: var(--surface-3); position: relative; cursor: pointer; transition: background 0.15s; flex-shrink: 0; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-3); transition: transform 0.15s, background 0.15s; }
.toggle.on { background: var(--accent); }
.toggle.on::after { transform: translateX(16px); background: #0A1A12; }

/* ── MODAL (doc upload) ──────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: none; align-items: center; justify-content: center; z-index: 300; }
.modal-overlay.open { display: flex; }
.modal { width: 1000px; max-width: 94vw; max-height: 88vh; background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r-lg); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,0.6); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-head .mh-title { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 500; color: var(--text); }
.modal-head .mh-title svg { width: 18px; height: 18px; stroke: var(--text-2); fill: none; stroke-width: 1.7; }
.modal-head .mh-bc { font-size: 14px; color: var(--text-3); }
.modal-search { margin-left: auto; position: relative; }
.modal-search input { background: rgba(255,255,255,0.04); border: 1px solid var(--border-2); border-radius: var(--r-sm); padding: 9px 14px 9px 36px; font-family: var(--font); font-size: 13px; color: var(--text); outline: none; width: 220px; }
.modal-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; stroke: var(--text-3); fill: none; stroke-width: 2; }
.modal-x { cursor: pointer; margin-left: 12px; }
.modal-x svg { width: 20px; height: 20px; stroke: var(--text-3); fill: none; stroke-width: 2; }
.modal-body { display: flex; flex: 1; min-height: 0; }
.modal-srcs { width: 220px; flex-shrink: 0; border-right: 1px solid var(--border); padding: 20px 16px; }
.modal-srcs-label { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); margin: 0 0 12px 4px; }
.msrc { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--r-sm); cursor: pointer; font-size: 13.5px; color: var(--text-2); margin-bottom: 4px; }
.msrc:hover { background: rgba(255,255,255,0.03); color: var(--text); }
.msrc.active { background: rgba(70,253,158,0.08); color: var(--accent); }
.msrc svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.msrc .msrc-dot { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.modal-files { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.modal-bc { display: flex; align-items: center; gap: 8px; padding: 16px 24px; font-size: 13px; color: var(--text-3); }
.modal-bc b { color: var(--text); font-weight: 500; }
.mf-list { flex: 1; overflow-y: auto; padding: 0 24px; }
.mf-row { display: flex; align-items: center; gap: 14px; padding: 12px 8px; border-bottom: 1px solid rgba(255,255,255,0.04); cursor: pointer; }
.mf-row:hover { background: rgba(255,255,255,0.02); }
.mf-row.sel { background: rgba(70,253,158,0.05); }
.mf-check { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--border-3); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.mf-row.sel .mf-check { background: var(--accent); border-color: var(--accent); }
.mf-check svg { width: 12px; height: 12px; stroke: #0A1A12; fill: none; stroke-width: 3; display: none; }
.mf-row.sel .mf-check svg { display: block; }
.mf-ic { width: 18px; height: 18px; flex-shrink: 0; }
.mf-ic svg { width: 18px; height: 18px; stroke: var(--accent); fill: none; stroke-width: 1.6; }
.mf-ic.folder svg { stroke: #E0A95E; }
.mf-name { flex: 1; font-size: 13.5px; color: var(--text); }
.mf-mod { font-size: 12.5px; color: var(--text-3); width: 130px; }
.mf-size { font-size: 12.5px; color: var(--text-3); width: 70px; text-align: right; }
.modal-selbar { display: flex; align-items: center; gap: 12px; padding: 14px 24px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.modal-selbar .sel-count { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.sel-tag { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,0.04); border: 1px solid var(--border-2); border-radius: var(--r-sm); padding: 5px 10px; font-size: 12px; color: var(--text-2); }
.sel-tag svg { width: 12px; height: 12px; stroke: var(--text-3); fill: none; stroke-width: 1.8; cursor: pointer; }
.sel-clear { font-size: 12.5px; color: var(--accent); cursor: pointer; }
.modal-foot { display: flex; align-items: center; padding: 16px 24px; border-top: 1px solid var(--border); }
.modal-foot .mf-note { font-size: 12.5px; color: var(--text-3); }
.modal-foot .mf-actions { margin-left: auto; display: flex; gap: 12px; }

/* ── LANGUAGE TOGGLE ─────────────────────────────────────── */
.lang-toggle { display: inline-flex; align-items: center; gap: 2px; background: rgba(255,255,255,0.04); border: 1px solid var(--border-2); border-radius: 100px; padding: 3px 5px 3px 9px; }
.lang-toggle .lt-globe { display: inline-flex; margin-right: 3px; }
.lang-toggle .lt-globe svg { width: 13px; height: 13px; stroke: var(--text-3); fill: none; stroke-width: 1.7; }
.lang-toggle button { background: none; border: none; font-family: var(--font); font-size: 11.5px; color: var(--text-3); padding: 5px 12px; border-radius: 100px; cursor: pointer; transition: background 0.15s, color 0.15s; line-height: 1; }
.lang-toggle button.active { background: var(--accent); color: #0A1A12; font-weight: 600; }
.lang-toggle button:not(.active):hover { color: var(--text); }
.side-langrow { display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }

/* ── SIDEBAR COLLAPSE ────────────────────────────────────── */
.side { transition: width 0.22s ease, padding 0.22s ease; position: relative; }
.side-collapse { margin-left: auto; cursor: pointer; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-sm); transition: background 0.15s; }
.side-collapse:hover { background: rgba(255,255,255,0.06); }
.side-collapse svg { width: 18px; height: 18px; stroke: var(--text-3); fill: none; stroke-width: 1.8; }
.app-shell.side-collapsed .side { width: 0; min-width: 0; padding-left: 0; padding-right: 0; border-right: none; overflow: hidden; }
.app-shell.side-collapsed .side > * { opacity: 0; visibility: hidden; }
.side-expand { display: none; position: fixed; top: 18px; left: 14px; z-index: 150; width: 34px; height: 34px; border-radius: var(--r-sm); border: 1px solid var(--border-2); background: var(--surface-2); align-items: center; justify-content: center; cursor: pointer; }
.app-shell.side-collapsed .side-expand { display: flex; }
.side-expand:hover { border-color: var(--border-3); }
.side-expand svg { width: 18px; height: 18px; stroke: var(--text-2); fill: none; stroke-width: 1.8; }
.app-shell.side-collapsed .chat-topbar { padding-left: 62px; }
.app-shell.side-collapsed .lib-main, .app-shell.side-collapsed .nc-main { padding-left: 62px; }

/* ── THINKING + REVEAL ───────────────────────────────────── */
.thinking { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 14px; padding: 4px 0; }
.thinking .dots { display: inline-flex; gap: 5px; }
.thinking .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; animation: tdot 1.2s infinite; }
.thinking .dots i:nth-child(2) { animation-delay: 0.2s; }
.thinking .dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes tdot { 0%, 60%, 100% { opacity: 0.25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.msg-lyra.reveal { animation: fadeUp 0.45s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ── PANEL RESIZE HANDLE ─────────────────────────────────── */
.rpanel { position: relative; }
.rpanel.dragging { transition: none; }
.rpanel-resize { position: absolute; left: 0; top: 0; bottom: 0; width: 7px; cursor: col-resize; z-index: 6; }
.rpanel-resize::after { content: ''; position: absolute; left: 2px; top: 0; bottom: 0; width: 1px; background: transparent; transition: background 0.15s; }
.rpanel-resize:hover::after { background: var(--accent); }

/* ── TOAST ───────────────────────────────────────────────── */
.lyra-toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--surface-2); border: 1px solid var(--border-2); border-radius: var(--r); padding: 12px 20px; font-size: 13.5px; color: var(--text); box-shadow: 0 12px 40px rgba(0,0,0,0.5); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 400; }
.lyra-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── EXTRACTION GRID ─────────────────────────────────────── */
.extract-grid { display: flex; flex-direction: column; margin: 16px 0 18px; border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
.ex-row { display: flex; gap: 18px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.ex-row:last-child { border-bottom: none; }
.ex-k { width: 200px; flex-shrink: 0; color: var(--text-2); font-size: 13px; }
.ex-v { flex: 1; color: var(--text); font-size: 13.5px; }

/* ── MODEL DROPDOWN ──────────────────────────────────────── */
.model-menu { background: var(--surface-2); border: 1px solid var(--border-2); border-radius: var(--r); padding: 6px; min-width: 270px; box-shadow: 0 12px 40px rgba(0,0,0,0.5); }
.model-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); cursor: pointer; }
.model-item:hover { background: var(--surface-3); }
.model-item .mi-main { flex: 1; }
.model-item .mi-name { font-size: 13.5px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.model-item .mi-name svg { width: 15px; height: 15px; flex-shrink: 0; stroke: var(--text-2); fill: none; stroke-width: 1.7; }
.model-item .mi-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.model-item .mi-badge { font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #0A1A12; background: var(--accent); border-radius: 100px; padding: 1px 7px; }
.model-item .mi-check { width: 15px; height: 15px; stroke: var(--accent); fill: none; stroke-width: 2.4; opacity: 0; margin-top: 2px; }
.model-item.sel .mi-check { opacity: 1; }
