/* ===== KB-IT — THÈME LIGHT CORPORATE (Microsoft 365) ===== */
:root {
  --bg-base:       #f0f4fa;
  --bg-surface:    #ffffff;
  --bg-surface2:   #f5f7fc;
  --bg-hover:      #e8f0fb;
  --bg-active:     #dce8f8;
  --border:        #d0daea;
  --border-light:  #e2eaf5;
  --border-strong: #b8c4d8;
  --text-primary:  #1a2030;
  --text-secondary:#3d4d66;
  --text-muted:    #7a88a0;
  --accent:        #1a6fc4;
  --accent-hover:  #1558a3;
  --accent-dim:    #e8f0fb;
  --accent-mid:    #5a9ee0;
  --green:         #1a7a4a;
  --green-dim:     #e6f5ee;
  --orange:        #b45309;
  --orange-dim:    #fef3e2;
  --red:           #c0392b;
  --red-dim:       #fdecea;
  --purple:        #6d28d9;
  --sidebar-w:     262px;
  --radius:        8px;
  --radius-sm:     5px;
  --shadow:        0 2px 12px rgba(26,111,196,.10);
  --font:          'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono:     'Cascadia Code', 'Consolas', 'Courier New', monospace;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  height: 100vh;
  display: flex;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; cursor: pointer; }
button { cursor: pointer; font-family: var(--font); }
input, textarea, select { font-family: var(--font); }

/* ===== SIDEBAR ===== */
#sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--accent);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.logo-icon { font-size: 22px; }
.logo-title { font-size: 16px; font-weight: 700; color: #ffffff; letter-spacing: -0.3px; }
.logo-sub { font-size: 10px; color: rgba(255,255,255,.75); text-transform: uppercase; letter-spacing: 1px; }

.btn-new {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  background: #ffffff;
  color: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s;
}
.btn-new svg { width: 14px; height: 14px; }
.btn-new:hover { background: #e8f0fb; }

.search-container {
  margin: 12px 14px;
  position: relative;
  flex-shrink: 0;
}
.search-container .search-icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; color: var(--text-muted);
}
#global-search {
  width: 100%;
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 36px 7px 32px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color .2s;
}
#global-search:focus { border-color: var(--accent); background: #fff; }
#global-search::placeholder { color: var(--text-muted); }
.search-container kbd {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: var(--border-light); border: 1px solid var(--border);
  border-radius: 3px; padding: 1px 5px; font-size: 10px; color: var(--text-muted);
  font-family: var(--font-mono);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.nav-section { margin-bottom: 6px; }
.nav-section-title {
  padding: 8px 16px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  border-right: 3px solid transparent;
  transition: background .12s, color .12s;
}
.nav-item svg { width: 14px; height: 14px; flex-shrink: 0; }
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
  border-right-color: var(--accent);
}
.nav-item .count {
  margin-left: auto;
  background: var(--border-light);
  color: var(--text-muted);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
}
.nav-item.active .count {
  background: var(--accent-dim);
  color: var(--accent);
}

/* Category tree */
.cat-item {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 16px 5px 22px;
  cursor: pointer; color: var(--text-secondary); font-size: 13px;
  transition: background .12s, color .12s;
  border-right: 3px solid transparent;
}
.cat-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.cat-item.active { color: var(--accent); background: var(--accent-dim); border-right-color: var(--accent); }
.cat-item .cat-icon { font-size: 13px; }
.cat-item .cat-count { margin-left: auto; font-size: 10px; color: var(--text-muted); font-weight: 600; }
.cat-item .cat-toggle { font-size: 10px; color: var(--text-muted); margin-right: 2px; cursor: pointer; transition: transform .2s; }
.cat-item .cat-toggle.open { transform: rotate(90deg); }
.cat-children { display: none; }
.cat-children.visible { display: block; }
.cat-children .cat-item { padding-left: 36px; }

/* Tags cloud */
#tags-cloud {
  padding: 4px 12px 8px;
  display: flex; flex-wrap: wrap; gap: 4px;
}
.tag-chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid #b5ccec;
  transition: all .15s;
}
.tag-chip:hover { background: var(--bg-active); border-color: var(--accent); }
.tag-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.sidebar-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg-surface2);
}
#stats-bar { font-size: 11px; color: var(--text-muted); display: flex; gap: 12px; flex-wrap: wrap; }

/* ===== MAIN ===== */
#main {
  flex: 1;
  overflow-y: auto;
  position: relative;
  background: var(--bg-base);
}
#main::-webkit-scrollbar { width: 6px; }
#main::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.view { display: none; min-height: 100%; }
.view.active { display: block; }

/* ===== PAGE HEADER ===== */
.page-header {
  padding: 20px 28px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  background: var(--bg-surface);
  position: sticky; top: 0; z-index: 10;
}
.page-title { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* ===== ARTICLE GRID / LIST ===== */
.articles-container { padding: 20px 28px; }
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
.articles-list { display: flex; flex-direction: column; gap: 6px; }

.article-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.article-card:hover { box-shadow: var(--shadow); border-color: var(--accent); }
.article-card.pinned { border-left-color: var(--orange); }

.card-title { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 5px; line-height: 1.4; }
.card-excerpt { font-size: 12px; color: var(--text-secondary); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-excerpt mark { background: #fff3cd; color: #856404; padding: 0 2px; border-radius: 2px; }
.card-meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.card-cat { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 3px; font-weight: 500; }
.card-date { font-size: 11px; color: var(--text-muted); margin-left: auto; }
.card-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }

.list-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  cursor: pointer;
  display: flex; align-items: center; gap: 12px;
  transition: background .12s, border-color .12s;
}
.list-item:hover { background: var(--accent-dim); border-color: var(--accent-mid); }
.list-item-title { font-size: 13px; font-weight: 500; flex: 1; }
.list-item-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 10px; align-items: center; }

/* ===== ARTICLE VIEW ===== */
.article-view { padding: 28px; max-width: 900px; margin: 0 auto; }
.article-view-header { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 2px solid var(--accent); }
.article-view-title { font-size: 26px; font-weight: 700; line-height: 1.3; margin-bottom: 12px; color: var(--text-primary); }
.article-view-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); }
.article-view-actions { display: flex; gap: 8px; margin-top: 16px; }

.article-content { line-height: 1.85; color: var(--text-primary); }
.article-content h1, .article-content h2, .article-content h3, .article-content h4 {
  color: var(--text-primary);
  margin: 22px 0 10px;
  font-weight: 700;
}
.article-content h1 { font-size: 20px; padding-bottom: 6px; border-bottom: 2px solid var(--accent); }
.article-content h2 { font-size: 16px; padding-left: 10px; border-left: 3px solid var(--accent); }
.article-content h3 { font-size: 14px; color: var(--accent); }
.article-content p { margin: 10px 0; }
.article-content ul, .article-content ol { margin: 10px 0 10px 20px; }
.article-content li { margin: 5px 0; }
.article-content pre {
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  overflow-x: auto;
  margin: 14px 0;
  position: relative;
}
.article-content code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #1a3a6a;
}
.article-content p code, .article-content li code {
  background: var(--accent-dim);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--accent);
  font-size: 12px;
  border: 1px solid #b5ccec;
}
.article-content blockquote {
  border-left: 3px solid var(--accent-mid);
  padding: 10px 14px;
  margin: 14px 0;
  background: var(--accent-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
  font-style: italic;
}
.article-content table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.article-content th, .article-content td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; font-size: 13px; }
.article-content th { background: var(--accent-dim); font-weight: 700; color: var(--accent); }
.article-content tr:nth-child(even) td { background: var(--bg-surface2); }
.article-content tr:hover td { background: var(--accent-dim); }
.article-content a { color: var(--accent); text-decoration: underline; }
.article-content img { max-width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }
.article-content hr { border: none; border-top: 2px solid var(--border); margin: 20px 0; }

.pre-wrapper { position: relative; }
.copy-btn {
  position: absolute; top: 8px; right: 8px;
  background: var(--bg-surface); border: 1px solid var(--border);
  color: var(--text-muted); border-radius: var(--radius-sm);
  padding: 3px 9px; font-size: 11px; opacity: 0;
  transition: opacity .2s; cursor: pointer;
}
.pre-wrapper:hover .copy-btn { opacity: 1; }
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }

/* ===== EDITOR ===== */
.editor-container { display: flex; flex-direction: column; height: 100vh; }
.editor-toolbar {
  background: var(--bg-surface2);
  border-bottom: 1px solid var(--border);
  padding: 7px 14px;
  display: flex; align-items: center; gap: 3px; flex-wrap: wrap;
  flex-shrink: 0;
}
.toolbar-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }
.tb-btn {
  background: none; border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 4px 8px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  transition: all .12s;
  min-width: 28px; display: flex; align-items: center; justify-content: center;
}
.tb-btn:hover { background: var(--bg-surface); border-color: var(--border); color: var(--text-primary); }
.tb-btn.active { background: var(--accent-dim); color: var(--accent); border-color: #b5ccec; }
.tb-btn svg { width: 13px; height: 13px; }

.editor-body { display: flex; flex: 1; overflow: hidden; }
.editor-meta {
  width: 260px; min-width: 260px;
  background: var(--bg-surface2);
  border-left: 1px solid var(--border);
  padding: 18px 14px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 16px;
}
.editor-main { flex: 1; overflow-y: auto; padding: 28px 32px; background: #fff; }

.editor-title-input {
  width: 100%; background: none; border: none; outline: none;
  font-size: 24px; font-weight: 700; color: var(--text-primary);
  font-family: var(--font); margin-bottom: 14px;
  border-bottom: 2px solid var(--accent);
  transition: border-color .2s;
  padding-bottom: 8px;
}
.editor-title-input::placeholder { color: var(--text-muted); }

#editor-content {
  min-height: 400px; outline: none;
  color: var(--text-primary); line-height: 1.85; font-size: 14px;
}
#editor-content:empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted); pointer-events: none;
}
#editor-content h1, #editor-content h2, #editor-content h3 { margin: 18px 0 8px; }
#editor-content h2 { padding-left: 10px; border-left: 3px solid var(--accent); }
#editor-content pre {
  background: var(--bg-surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
  font-family: var(--font-mono); font-size: 12.5px; margin: 10px 0; overflow-x: auto;
  color: #1a3a6a;
}
#editor-content blockquote {
  border-left: 3px solid var(--accent-mid); padding: 8px 14px;
  background: var(--accent-dim); margin: 10px 0;
  border-radius: 0 4px 4px 0; font-style: italic;
}
#editor-content table { border-collapse: collapse; width: 100%; margin: 10px 0; }
#editor-content th, #editor-content td { border: 1px solid var(--border); padding: 7px 10px; }
#editor-content th { background: var(--accent-dim); color: var(--accent); font-weight: 700; }

.meta-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--text-muted); margin-bottom: 5px; }
.meta-select, .meta-input-sm {
  width: 100%; background: var(--bg-surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 7px 10px;
  color: var(--text-primary); font-size: 13px; outline: none;
  transition: border-color .2s;
}
.meta-select:focus, .meta-input-sm:focus { border-color: var(--accent); }

.tags-input-container {
  display: flex; flex-wrap: wrap; gap: 4px;
  background: var(--bg-surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 5px 7px;
  min-height: 38px; cursor: text;
}
.tags-input-container:focus-within { border-color: var(--accent); }
.tags-input-container input {
  background: none; border: none; outline: none;
  color: var(--text-primary); font-size: 13px; flex: 1; min-width: 80px;
}
.tag-pill {
  display: flex; align-items: center; gap: 3px;
  background: var(--accent-dim); border: 1px solid #b5ccec;
  border-radius: 12px; padding: 1px 8px; font-size: 11px; color: var(--accent); font-weight: 600;
}
.tag-pill button { background: none; border: none; color: var(--text-muted); padding: 0; font-size: 13px; line-height: 1; }
.tag-pill button:hover { color: var(--red); }

.toggle-row { display: flex; align-items: center; justify-content: space-between; }
.toggle { position: relative; width: 36px; height: 20px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: var(--border-strong);
  border-radius: 20px; cursor: pointer; transition: .3s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 14px; height: 14px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .3s;
}
.toggle input:checked + .toggle-slider { background: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(16px); }

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm);
  padding: 8px 16px; font-size: 13px; font-weight: 600;
  transition: background .15s;
  cursor: pointer;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  background: var(--bg-surface); color: var(--text-secondary);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 8px 16px; font-size: 13px; font-weight: 500;
  transition: all .15s; cursor: pointer;
}
.btn-secondary:hover { background: var(--accent-dim); color: var(--accent); border-color: var(--accent-mid); }

.btn-danger {
  background: var(--red-dim); color: var(--red);
  border: 1px solid #f5b7b1; border-radius: var(--radius-sm);
  padding: 8px 16px; font-size: 13px; font-weight: 600;
  transition: background .15s; cursor: pointer;
}
.btn-danger:hover { background: var(--red); color: #fff; }

.btn-icon {
  background: var(--bg-surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 6px 12px;
  color: var(--text-secondary); font-size: 13px; font-weight: 500;
  display: flex; align-items: center; gap: 5px;
  transition: all .15s; cursor: pointer;
}
.btn-icon:hover { background: var(--accent-dim); color: var(--accent); border-color: var(--accent-mid); }
.btn-icon svg { width: 14px; height: 14px; }

.btn-icon-sm {
  background: none; border: none; color: var(--text-muted);
  font-size: 16px; width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 3px; transition: all .15s; cursor: pointer;
}
.btn-icon-sm:hover { color: var(--accent); background: var(--accent-dim); }

/* ===== MODAL ===== */
#modal-overlay {
  position: fixed; inset: 0;
  background: rgba(26,32,48,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
#modal-overlay.hidden { display: none; }
#modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(26,111,196,.15);
  width: 100%; max-width: 520px;
  max-height: 80vh; overflow-y: auto;
}
#modal-content { padding: 24px; }
.modal-title { font-size: 16px; font-weight: 700; margin-bottom: 18px; color: var(--text-primary); }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }

/* ===== FORM FIELDS ===== */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 11px; font-weight: 700; color: var(--text-muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .5px; }
.form-input, .form-select, .form-textarea {
  width: 100%; background: var(--bg-surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 8px 12px;
  color: var(--text-primary); font-size: 13px; outline: none;
  transition: border-color .2s; font-family: var(--font);
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(26,111,196,.1); }
.form-textarea { resize: vertical; min-height: 100px; }

/* ===== TOAST ===== */
#toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px;
  font-size: 13px; display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow); animation: slideIn .3s ease;
  max-width: 320px;
}
.toast.success { border-color: var(--green); border-left: 4px solid var(--green); }
.toast.error { border-color: var(--red); border-left: 4px solid var(--red); }
.toast.info { border-color: var(--accent); border-left: 4px solid var(--accent); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ===== HOME DASHBOARD ===== */
.home-content { padding: 28px; }
.home-greeting { font-size: 22px; font-weight: 700; margin-bottom: 4px; color: var(--text-primary); }
.home-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 28px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 28px; }
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.stat-card:nth-child(2) { border-top-color: var(--green); }
.stat-card:nth-child(3) { border-top-color: var(--orange); }
.stat-card:nth-child(4) { border-top-color: var(--purple); }
.stat-value { font-size: 28px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat-card:nth-child(2) .stat-value { color: var(--green); }
.stat-card:nth-child(3) .stat-value { color: var(--orange); }
.stat-card:nth-child(4) .stat-value { color: var(--purple); }
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 3px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.section-title { font-size: 11px; font-weight: 700; color: var(--text-muted); margin-bottom: 12px; text-transform: uppercase; letter-spacing: .6px; }

/* ===== IMPORT ===== */
.import-zone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius);
  padding: 40px; text-align: center; cursor: pointer;
  transition: all .2s; margin-bottom: 18px;
  background: var(--bg-surface2);
}
.import-zone:hover, .import-zone.drag-over {
  border-color: var(--accent); background: var(--accent-dim);
}
.import-zone-icon { font-size: 36px; margin-bottom: 10px; color: var(--accent); }
.import-zone-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; color: var(--text-primary); }
.import-zone-sub { font-size: 12px; color: var(--text-muted); }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state-title { font-size: 16px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state-sub { font-size: 13px; }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-muted);
  padding: 10px 28px;
  background: var(--bg-surface2);
  border-bottom: 1px solid var(--border);
}
.breadcrumb a { color: var(--accent); }
.breadcrumb a:hover { text-decoration: underline; }

/* ===== FILTER BAR ===== */
.filter-bar {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 28px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.filter-label { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.view-toggle { display: flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.view-toggle button { background: none; border: none; padding: 5px 10px; color: var(--text-muted); transition: all .12s; }
.view-toggle button.active { background: var(--accent-dim); color: var(--accent); }
.view-toggle button svg { width: 14px; height: 14px; display: block; }

/* ===== BADGES ===== */
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.badge-blue { background: var(--accent-dim); color: var(--accent); }
.badge-green { background: var(--green-dim); color: var(--green); }
.badge-orange { background: var(--orange-dim); color: var(--orange); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  #sidebar { width: 200px; min-width: 200px; --sidebar-w: 200px; }
  .articles-grid { grid-template-columns: 1fr; }
  .editor-meta { display: none; }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ===== UTILS ===== */
.hidden { display: none !important; }
.flex { display: flex; }
.gap-8 { gap: 8px; }
.mt-16 { margin-top: 16px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12px; }
