/* Dashboard Builder */
.db-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; padding: 12px 16px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; }
.db-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); grid-auto-rows: minmax(240px, auto); gap: 16px; min-height: 300px; }
@media (min-width: 1024px) { .db-grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 280px; } }
@media (min-width: 1440px) { .db-grid { grid-template-columns: repeat(6, 1fr); } }
.db-widget { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; overflow: hidden; position: relative; transition: all .25s ease; display: flex; flex-direction: column; }
.db-widget:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--accent); }
.db-widget.dragging { opacity: .5; border: 2px dashed var(--accent); }
.db-widget[data-span="2"] { grid-column: span 2; }
.db-widget-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; min-height: 24px; gap: 8px; padding-right: 4px; }
.db-widget-header span { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: .4px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-widget-header i { color: var(--accent); font-size: 14px; flex-shrink: 0; }
.db-widget-remove { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 16px; padding: 0; width: 20px; height: 20px; border-radius: 4px; transition: all .15s; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.db-widget-remove:hover { background: var(--hover); color: var(--red); }
.db-widget-body { flex: 1; display: flex; align-items: stretch; justify-content: flex-start; font-size: 13px; color: var(--text); overflow: auto; padding: 4px 0; }
.db-widget-body canvas { max-height: 100%; width: 100%; }
.db-add-btn { background: var(--bg3); border: 2px dashed var(--border); border-radius: 12px; padding: 32px 20px; text-align: center; cursor: pointer; color: var(--muted); font-size: 13px; transition: all .25s; min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.db-add-btn:hover { border-color: var(--accent); background: var(--hover); color: var(--accent); }
.db-add-btn i { font-size: 28px; }
.db-layout-select { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.db-layout-chip { padding: 8px 16px; border-radius: 20px; border: 1px solid var(--border); font-size: 13px; cursor: pointer; background: var(--card); transition: all .2s; }
.db-layout-chip:hover { border-color: var(--accent); }
.db-layout-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }

/* Horizontal Scroll Lists */
.h-scroll-list { display: flex; gap: 12px; overflow-x: auto; padding: 4px 4px; scroll-behavior: smooth; }
.h-scroll-list::-webkit-scrollbar { height: 6px; }
.h-scroll-list::-webkit-scrollbar-track { background: var(--bg3); border-radius: 3px; }
.h-scroll-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.h-scroll-list::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Article Cards */
.article-card { flex-shrink: 0; width: 240px; padding: 12px; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; transition: all .2s; cursor: pointer; display: flex; flex-direction: column; gap: 8px; }
.article-card:hover { background: var(--hover); border-color: var(--accent); transform: translateY(-2px); }
.article-card-title { font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-card-meta { font-size: 10px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }

/* Keyword Pills */
.keyword-pill { flex-shrink: 0; padding: 8px 14px; background: var(--accent); color: #fff; border-radius: 16px; font-size: 12px; font-weight: 600; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.keyword-pill .count { opacity: 0.85; font-size: 10px; margin-left: 2px; }

/* Entity Chips */
.entity-chip { flex-shrink: 0; padding: 10px 12px; background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; transition: all .2s; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 160px; }
.entity-chip:hover { background: var(--hover); border-color: var(--accent); }
.entity-chip-name { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; flex: 1; }
.entity-chip-badge { font-size: 9px; padding: 3px 8px; border-radius: 3px; background: var(--accent); color: #fff; font-weight: 700; }
.entity-chip-count { font-size: 10px; color: var(--muted); margin-top: 2px; }
