.ai-knowledge-page { display: grid; gap: 20px; }
.ai-knowledge-hero { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; padding: 24px; border: 1px solid #e4e5f4; border-radius: 20px; background: linear-gradient(135deg, #faf9ff 0%, #fff 58%, #f3fbf8 100%); }
.ai-knowledge-hero h2 { margin: 4px 0 8px; font-size: clamp(22px, 3vw, 30px); letter-spacing: -.03em; }
.ai-knowledge-hero p { max-width: 720px; margin: 0; color: #68708a; line-height: 1.6; }
.ai-knowledge-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.ai-knowledge-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ai-knowledge-stat { border: 1px solid #e7e8f2; border-radius: 16px; background: #fff; padding: 16px 18px; }
.ai-knowledge-stat strong { display: block; color: #151b2e; font-size: 25px; letter-spacing: -.03em; }
.ai-knowledge-stat span { color: #747b91; font-size: 12px; }
.ai-knowledge-layout { display: grid; grid-template-columns: minmax(280px, .82fr) minmax(0, 1.18fr); gap: 18px; align-items: start; }
.ai-knowledge-form-panel, .ai-knowledge-library-panel { min-width: 0; }
.ai-knowledge-form-panel { position: sticky; top: 20px; }
.ai-knowledge-form-panel h3, .ai-knowledge-library-panel h3 { margin: 0; color: #171b2e; font-size: 18px; }
.ai-knowledge-form-panel .panel-heading, .ai-knowledge-library-panel .panel-heading { align-items: flex-start; }
.ai-knowledge-form { display: grid; gap: 13px; }
.ai-knowledge-form label { display: grid; gap: 7px; color: #30374d; font-size: 13px; font-weight: 650; }
.ai-knowledge-form input, .ai-knowledge-form select, .ai-knowledge-form textarea, .ai-knowledge-search { width: 100%; box-sizing: border-box; border: 1px solid #dfe2ee; border-radius: 10px; padding: 11px 12px; color: #1a2032; background: #fff; font: inherit; }
.ai-knowledge-form textarea { min-height: 230px; resize: vertical; line-height: 1.55; }
.ai-knowledge-form input:focus, .ai-knowledge-form select:focus, .ai-knowledge-form textarea:focus, .ai-knowledge-search:focus { outline: 3px solid rgba(101, 92, 240, .14); border-color: #756cf5; }
.ai-knowledge-form small { color: #7b8297; font-weight: 400; line-height: 1.45; }
.ai-knowledge-form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 4px; }
.ai-knowledge-library-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ai-knowledge-search { max-width: 280px; }
.ai-knowledge-toggle { display: inline-flex; gap: 7px; align-items: center; color: #66708a; font-size: 12px; white-space: nowrap; }
.ai-knowledge-toggle input { accent-color: #685cf1; }
.ai-knowledge-list { display: grid; gap: 12px; }
.ai-knowledge-entry { border: 1px solid #e3e5ef; border-radius: 15px; padding: 17px; background: #fff; transition: border-color .18s ease, box-shadow .18s ease; }
.ai-knowledge-entry:hover { border-color: #c6c3fb; box-shadow: 0 8px 24px rgba(44, 40, 100, .07); }
.ai-knowledge-entry.is-archived { opacity: .68; background: #fafafa; }
.ai-knowledge-entry-top { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; }
.ai-knowledge-entry h4 { margin: 0; color: #161b2d; font-size: 15px; }
.ai-knowledge-entry-meta { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; margin-top: 7px; }
.ai-knowledge-chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 8px; background: #f0efff; color: #574bdd; font-size: 11px; font-weight: 700; }
.ai-knowledge-chip.muted { background: #f0f1f4; color: #697183; }
.ai-knowledge-entry p { margin: 13px 0 0; color: #555e75; white-space: pre-line; line-height: 1.55; font-size: 13px; }
.ai-knowledge-entry p.ai-knowledge-summary { margin-top: 11px; color: #4b526a; font-size: 12px; }
.ai-knowledge-entry p.ai-knowledge-summary strong, .ai-knowledge-keywords strong { color: #31384d; }
.ai-knowledge-keywords { margin-top: 12px; color: #727a91; font-size: 11px; line-height: 1.5; }
.ai-knowledge-chip.type-chip { color: #15704e; background: #eaf9f1; }
.ai-knowledge-chip.location-chip { color: #8a5a18; background: #fff6df; }
.ai-knowledge-source { display: inline-block; margin-top: 11px; color: #4f46d8; font-size: 12px; overflow-wrap: anywhere; }
.ai-knowledge-entry-footer { display: flex; justify-content: space-between; gap: 12px; align-items: center; border-top: 1px solid #eef0f5; margin-top: 15px; padding-top: 12px; }
.ai-knowledge-entry-footer small { color: #8a90a2; }
.ai-knowledge-entry-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ai-knowledge-entry-actions button { border: 0; background: transparent; color: #5d56d8; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; padding: 4px; }
.ai-knowledge-entry-actions button:hover { color: #332bb0; text-decoration: underline; }
.ai-knowledge-empty { border: 1px dashed #d7d9e7; border-radius: 14px; padding: 30px 18px; color: #747c92; text-align: center; }
.ai-knowledge-empty strong { display: block; color: #30374c; margin-bottom: 5px; }
.ai-knowledge-empty p { margin: 0; font-size: 13px; line-height: 1.5; }
.ai-knowledge-inline-note { border-radius: 11px; padding: 11px 12px; color: #596179; background: #f7f7fc; font-size: 12px; line-height: 1.5; }
.ai-knowledge-inline-note strong { color: #31384d; }
@media (max-width: 900px) { .ai-knowledge-layout { grid-template-columns: 1fr; } .ai-knowledge-form-panel { position: static; } }
@media (max-width: 620px) { .ai-knowledge-hero { display: grid; padding: 18px; } .ai-knowledge-hero-actions { justify-content: flex-start; } .ai-knowledge-stat-grid { grid-template-columns: 1fr; } .ai-knowledge-library-toolbar { display: grid; } .ai-knowledge-search { max-width: none; } .ai-knowledge-entry-top, .ai-knowledge-entry-footer { display: grid; } .ai-knowledge-entry-actions { justify-content: flex-start; } }
