/* =========================================================
   Project folder library
   ========================================================= */
.library-modal { width: min(780px, 96vw); }
.library-modal .modal-body { padding: 16px 18px 12px; }
.project-library { display: flex; flex-direction: column; gap: 10px; }
.library-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border-radius: 9px; border: 1px solid rgba(94, 214, 196, 0.14); background: rgba(94, 214, 196, 0.035); }
.library-location { display: flex; align-items: center; gap: 9px; min-width: 0; }
.library-folder-icon { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 8px; display: grid; place-items: center; color: #5ed6c4; background: rgba(94, 214, 196, 0.09); border: 1px solid rgba(94, 214, 196, 0.16); }
.library-location > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.library-location strong { font-size: 10.5px; color: #d9f2ed; font-weight: 600; }
.library-location small { font-size: 8px; color: #7f9d99; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-mono, ui-monospace, monospace); }
.library-top-actions { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.library-status-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 1px 2px; }
.library-auto { display: flex; align-items: center; gap: 5px; font-size: 9px; color: #9fb0c5; cursor: pointer; }
.library-auto input { accent-color: #5ed6c4; width: 12px; height: 12px; }
.library-auto span { display: flex; align-items: center; gap: 4px; }
.library-current { font-size: 8px; color: #7b8b9e; }
.library-error { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 6px; border: 1px solid rgba(255, 114, 136, 0.18); background: rgba(255, 114, 136, 0.05); color: #e7a0ad; font-size: 9px; }
.library-list { display: flex; flex-direction: column; gap: 6px; max-height: 390px; overflow-y: auto; padding-right: 3px; }
.library-project { display: flex; align-items: stretch; gap: 3px; border-radius: 8px; border: 1px solid rgba(148, 174, 210, 0.09); background: rgba(148, 174, 210, 0.025); transition: border-color 0.14s, background 0.14s; }
.library-project:hover { border-color: rgba(148, 174, 210, 0.2); background: rgba(148, 174, 210, 0.045); }
.library-project.is-current { border-color: rgba(94, 214, 196, 0.26); background: rgba(94, 214, 196, 0.045); }
.library-project.is-invalid { border-color: rgba(255, 114, 136, 0.2); }
.library-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; text-align: left; padding: 9px 10px; color: inherit; }
.library-open:disabled { opacity: 0.55; cursor: wait; }
.library-project-icon { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 7px; display: grid; place-items: center; color: #8eb9c9; background: rgba(148, 174, 210, 0.07); }
.library-project-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.library-project-main strong { font-size: 10.5px; color: #d7e1ee; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.library-project-main small { font-size: 7.5px; color: #6f7e92; font-family: var(--font-mono, ui-monospace, monospace); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.library-project-meta { font-size: 7.5px; color: #657487; margin-top: 1px; }
.library-badge { flex: 0 0 auto; font-size: 7px; color: #85e1c7; border: 1px solid rgba(94, 214, 196, 0.2); border-radius: 3px; padding: 1px 4px; }
.library-badge.danger { color: #e99aa8; border-color: rgba(255, 114, 136, 0.2); }
.library-open-arrow { flex: 0 0 auto; color: #5f6c7f; }
.library-project:hover .library-open-arrow { color: #c8d5e4; }
.library-delete { align-self: center; margin-right: 7px; }
.library-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 42px 18px; border-radius: 9px; border: 1px dashed rgba(148, 174, 210, 0.16); color: #8190a4; text-align: center; }
.library-empty > svg { color: #5ed6c4; opacity: 0.65; }
.library-empty strong { font-size: 11px; color: #c8d5e4; font-weight: 600; margin-top: 2px; }
.library-empty span { font-size: 8.5px; color: #738296; max-width: 340px; line-height: 1.6; }
.library-empty .btn { margin-top: 6px; }
.library-loading { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 36px; color: #7d8da1; font-size: 9px; }
.library-loading svg { animation: spin 1s linear infinite; }
.library-footnote { display: flex; align-items: flex-start; gap: 5px; padding: 2px 2px 0; font-size: 7.5px; line-height: 1.55; color: #657487; }
.library-footnote svg { flex: 0 0 auto; margin-top: 1px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 700px) {
  .library-top { align-items: flex-start; flex-direction: column; }
  .library-top-actions { width: 100%; justify-content: flex-end; }
  .library-status-row { align-items: flex-start; flex-direction: column; }
}
.library-error > span { display: flex; flex-direction: column; gap: 3px; }
.library-error small { font-size: 7.5px; line-height: 1.55; color: #b78f97; }
