/* ═══════════════════════════════════════════
   JobSnips Knowledge Base — kb.css
   ─────────────────────────────────────────── */

:root {
  --bg:      #0B1320;
  --bg2:     #0F1C2E;
  --bg3:     #142238;
  --cyan:    #29ABE2;
  --cream:   #EBE8E1;
  --border:  rgba(41,171,226,0.18);
  --muted:   rgba(255,255,255,0.4);
  --red:     #e74c3c;
  --green:   #27ae60;
  --ease:    cubic-bezier(0.25,0.46,0.45,0.94);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: #fff;
  line-height: 1.65;
  min-height: 100vh;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── LOGIN PAGE ─── */
.kb-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.kb-login-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(41,171,226,0.04) 0%, transparent 60%),
    repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(41,171,226,0.05) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(41,171,226,0.05) 60px);
  pointer-events: none;
}
.kb-login-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px 44px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}
.kb-login-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  text-decoration: none;
}
.kb-login-wordmark { font-size: 20px; font-weight: 800; color: #fff; }
.kb-login-wordmark span { color: var(--cyan); }
.kb-login-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(41,171,226,0.12);
  color: var(--cyan);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
}
.kb-login-title { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.kb-login-sub { color: var(--muted); font-size: 14px; margin-bottom: 28px; }

.kb-field { margin-bottom: 18px; }
.kb-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: rgba(255,255,255,0.75); }
.kb-input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 14px;
  color: #fff;
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
}
.kb-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(41,171,226,0.12); }
.kb-input.error { border-color: var(--red); }
.kb-input-wrap { position: relative; }
.kb-input-wrap .kb-input { padding-right: 44px; }
.kb-eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  transition: color 0.2s;
}
.kb-eye-btn:hover { color: rgba(255,255,255,0.7); }

.kb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.2s var(--ease);
  text-decoration: none;
}
.kb-btn--primary { background: var(--cyan); color: var(--bg); width: 100%; }
.kb-btn--primary:hover { background: #3bbff0; transform: translateY(-1px); text-decoration: none; color: var(--bg); }
.kb-btn--ghost { background: transparent; color: var(--cyan); border: 1px solid var(--border); }
.kb-btn--ghost:hover { background: rgba(41,171,226,0.08); text-decoration: none; }
.kb-btn--danger { background: var(--red); color: #fff; }
.kb-btn--danger:hover { background: #c0392b; text-decoration: none; color: #fff; }
.kb-btn--sm { padding: 7px 14px; font-size: 12px; border-radius: 6px; }

.kb-alert {
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.kb-alert--error { background: rgba(231,76,60,0.12); border: 1px solid rgba(231,76,60,0.3); color: #ff6b6b; }
.kb-alert--success { background: rgba(39,174,96,0.12); border: 1px solid rgba(39,174,96,0.3); color: #55efc4; }
.kb-alert--info { background: rgba(41,171,226,0.1); border: 1px solid var(--border); color: var(--cyan); }

/* ─── SHELL (nav + sidebar + main) ─── */
.kb-shell { display: flex; flex-direction: column; min-height: 100vh; }

.kb-topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11,19,32,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
}
.kb-topnav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.kb-topnav-wordmark { font-size: 17px; font-weight: 800; color: #fff; }
.kb-topnav-wordmark span { color: var(--cyan); }
.kb-topnav-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(41,171,226,0.12);
  color: var(--cyan);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 8px;
}
.kb-topnav-search {
  flex: 1;
  max-width: 400px;
  margin-left: auto;
}
.kb-search-input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 8px 14px 8px 36px;
  font-size: 13px;
  color: #fff;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.3)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
}
.kb-search-input:focus { border-color: var(--cyan); }
.kb-search-input::placeholder { color: var(--muted); }

.kb-topnav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 16px;
  flex-shrink: 0;
}
.kb-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cyan);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}
.kb-user-name { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.8); }
.kb-user-role { font-size: 11px; color: var(--muted); }
.kb-logout-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 5px 10px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.kb-logout-link:hover {
  color: #e74c3c;
  background: rgba(231,76,60,0.1);
  border-color: rgba(231,76,60,0.3);
  text-decoration: none;
}
.kb-logout-link svg { width: 13px; height: 13px; }

/* ─── BODY LAYOUT ─── */
.kb-body { display: flex; flex: 1; }

.kb-sidebar {
  width: 240px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
}
.kb-sidebar-section { margin-bottom: 24px; }
.kb-sidebar-heading {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 20px;
  margin-bottom: 6px;
}
.kb-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all 0.15s;
}
.kb-nav-link:hover { color: #fff; background: rgba(41,171,226,0.06); text-decoration: none; }
.kb-nav-link.active { color: var(--cyan); border-left-color: var(--cyan); background: rgba(41,171,226,0.06); }
.kb-nav-icon { font-size: 15px; flex-shrink: 0; width: 18px; text-align: center; }
.kb-nav-count {
  margin-left: auto;
  background: var(--bg3);
  color: var(--muted);
  font-size: 11px;
  border-radius: 10px;
  padding: 1px 7px;
}

/* ─── MAIN CONTENT ─── */
.kb-main {
  flex: 1;
  padding: 36px 40px;
  max-width: 960px;
  min-width: 0;
}

.kb-page-title {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}
.kb-page-sub { font-size: 14px; color: var(--muted); margin-bottom: 32px; }

/* ─── CATEGORY CARDS GRID ─── */
.kb-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}
.kb-cat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  text-decoration: none;
  transition: all 0.2s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kb-cat-card:hover { border-color: var(--cyan); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); text-decoration: none; }
.kb-cat-icon { font-size: 26px; }
.kb-cat-name { font-size: 15px; font-weight: 700; color: #fff; }
.kb-cat-count { font-size: 12px; color: var(--muted); }

/* ─── ARTICLE LIST ─── */
.kb-section-heading {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.kb-section-heading::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.kb-article-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 32px; }
.kb-article-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s;
  color: rgba(255,255,255,0.8);
}
.kb-article-row:hover { background: var(--bg2); text-decoration: none; color: #fff; }
.kb-article-row-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  background: var(--bg3);
}
.kb-article-row-title { font-size: 14px; font-weight: 600; }
.kb-article-row-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kb-article-row-pin {
  margin-left: auto;
  font-size: 10px;
  color: var(--cyan);
  background: rgba(41,171,226,0.1);
  border-radius: 4px;
  padding: 2px 7px;
  flex-shrink: 0;
}

/* ─── SEARCH RESULTS ─── */
.kb-search-results { display: none; }
.kb-search-results.active { display: block; }
.kb-no-results { color: var(--muted); font-size: 14px; padding: 20px 0; }

/* ─── ARTICLE VIEW ─── */
.kb-article-wrap { max-width: 760px; }
.kb-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 24px;
}
.kb-breadcrumb a { color: var(--muted); }
.kb-breadcrumb a:hover { color: var(--cyan); }
.kb-breadcrumb-sep { opacity: 0.4; }

.kb-article-header { margin-bottom: 32px; }
.kb-article-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 14px;
  background: rgba(41,171,226,0.1);
  color: var(--cyan);
  border: 1px solid var(--border);
}
.kb-article-title { font-size: 28px; font-weight: 800; line-height: 1.25; margin-bottom: 10px; }
.kb-article-meta { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 16px; }

.kb-article-body {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(255,255,255,0.85);
}
.kb-article-body h2 {
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  margin: 32px 0 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.kb-article-body h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }
.kb-article-body h3 { font-size: 16px; font-weight: 700; color: var(--cyan); margin: 20px 0 8px; }
.kb-article-body p { margin-bottom: 14px; }
.kb-article-body ul, .kb-article-body ol { padding-left: 20px; margin-bottom: 14px; }
.kb-article-body li { margin-bottom: 6px; }
.kb-article-body strong { color: #fff; font-weight: 700; }
.kb-article-body em { color: rgba(255,255,255,0.6); font-style: italic; }
.kb-article-body blockquote {
  border-left: 3px solid var(--cyan);
  padding: 12px 18px;
  background: var(--bg2);
  border-radius: 0 8px 8px 0;
  margin: 16px 0;
  color: rgba(255,255,255,0.7);
  font-style: italic;
}
.kb-article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13px;
}
.kb-article-body th {
  padding: 10px 12px;
  text-align: left;
  background: var(--bg3);
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  border-bottom: 1px solid var(--border);
}
.kb-article-body td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* ─── ADMIN DASHBOARD ─── */
.kb-admin-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.kb-tab {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}
.kb-tab:hover { color: #fff; }
.kb-tab.active { color: var(--cyan); border-bottom-color: var(--cyan); }

.kb-tab-panel { display: none; }
.kb-tab-panel.active { display: block; }

.kb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.kb-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.kb-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
.kb-table tr:last-child td { border-bottom: none; }
.kb-table tr:hover td { background: rgba(255,255,255,0.02); }

.kb-role-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.kb-role-badge--admin { background: rgba(41,171,226,0.15); color: var(--cyan); }
.kb-role-badge--writer { background: rgba(39,174,96,0.15); color: #55efc4; }

.kb-status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}
.kb-status-dot--active { background: var(--green); }
.kb-status-dot--inactive { background: var(--muted); }

.kb-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kb-form-grid .kb-field--full { grid-column: 1 / -1; }

.kb-form-wrap {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 28px;
}
.kb-form-wrap h3 { font-size: 15px; font-weight: 700; margin-bottom: 18px; }

.kb-select {
  width: 100%;
  background: var(--bg3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 14px;
  color: #fff;
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.kb-select:focus { border-color: var(--cyan); }
.kb-textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 14px;
  color: #fff;
  font-family: inherit;
  resize: vertical;
  min-height: 120px;
  outline: none;
  transition: border-color 0.2s;
}
.kb-textarea:focus { border-color: var(--cyan); }

/* Log action badges */
.kb-log-action {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}
.kb-log-action--login    { background: rgba(41,171,226,0.15); color: var(--cyan); }
.kb-log-action--logout   { background: rgba(255,255,255,0.06); color: var(--muted); }
.kb-log-action--view     { background: rgba(39,174,96,0.12); color: #55efc4; }
.kb-log-action--search   { background: rgba(230,126,34,0.12); color: #f39c12; }

/* ─── FEATHER SVG ICONS ─── */
svg.feather {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Context-specific sizes */
.kb-nav-icon svg.feather       { width: 14px; height: 14px; }
.kb-cat-icon svg.feather       { width: 26px; height: 26px; }
.kb-article-row-icon svg.feather{ width: 15px; height: 15px; }
.kb-section-heading svg.feather { width: 13px; height: 13px; }
.kb-article-cat-badge svg.feather{ width: 11px; height: 11px; }
.kb-tab svg.feather             { width: 13px; height: 13px; }
.kb-btn svg.feather             { width: 14px; height: 14px; }
.kb-alert svg.feather           { width: 15px; height: 15px; }
.kb-modal-head svg.feather      { width: 20px; height: 20px; }
.kb-comments h2 svg.feather     { width: 16px; height: 16px; }

/* ─── COMMUNITY BUTTON (WhatsApp) ─── */
.kb-sidebar-community {
  padding: 16px;
  margin-top: 8px;
}
.kb-community-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(37, 211, 102, 0.08);
  border: 1px solid rgba(37, 211, 102, 0.35);
  border-radius: 8px;
  color: #25D366;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s var(--ease);
  text-decoration: none;
}
.kb-community-btn:hover {
  background: rgba(37, 211, 102, 0.15);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.15);
}
.kb-community-hint {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-top: 6px;
  line-height: 1.5;
}

/* ─── MODAL ─── */
.kb-modal-overlay {
  position: fixed; inset: 0; z-index: 998;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}
.kb-modal-box {
  position: fixed; z-index: 999;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.kb-modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.kb-modal-head h3 { font-size: 17px; font-weight: 700; flex: 1; }
.kb-modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--muted); padding: 4px;
  display: flex; align-items: center;
  font-size: 18px; line-height: 1;
  transition: color 0.15s;
}
.kb-modal-close:hover { color: #fff; }
.kb-modal-sub {
  font-size: 13px; color: var(--muted);
  margin-bottom: 16px; line-height: 1.6;
}
.kb-modal-actions {
  display: flex; gap: 10px; margin-top: 14px;
}
.kb-btn--wa { background: #25D366 !important; color: #fff !important; }
.kb-btn--wa:hover { background: #1da851 !important; text-decoration: none; color: #fff !important; }
.kb-btn--wa svg.feather { stroke: #fff; }

/* ─── TOAST ─── */
.kb-toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #25D366; color: #fff;
  padding: 12px 24px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  z-index: 9999; opacity: 0;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.kb-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ─── PREVIEW MODE BANNER ─── */
.kb-preview-banner {
  position: sticky; top: 56px; z-index: 50;
  background: rgba(230,126,34,0.12);
  border-bottom: 1px solid rgba(230,126,34,0.35);
  padding: 8px 24px;
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: #f39c12;
}
.kb-preview-banner strong { font-weight: 700; }
.kb-preview-banner a {
  margin-left: auto; font-size: 12px;
  color: #f39c12; text-decoration: underline;
}

/* ─── COMMENTS SECTION ─── */
.kb-comments { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border); }
.kb-comment {
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  transition: border-color 0.2s;
}
.kb-comment:hover { border-color: rgba(41,171,226,0.3); }
.kb-comment--resolved {
  opacity: 0.6;
  border-color: rgba(39,174,96,0.3) !important;
}
.kb-comment-header {
  display: flex; align-items: center; gap: 10px;
}
.kb-comment-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--cyan);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; flex-shrink: 0;
}
.kb-comment-info { flex: 1; }
.kb-comment-name { font-size: 13px; font-weight: 600; }
.kb-comment-date { font-size: 11px; color: var(--muted); }
.kb-comment-resolved-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--green);
  background: rgba(39,174,96,0.1); border-radius: 4px;
  padding: 2px 8px; flex-shrink: 0;
}
.kb-comment-body {
  font-size: 13px; color: rgba(255,255,255,0.75);
  line-height: 1.6; padding-left: 40px;
}
.kb-comment-form {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 20px; margin-top: 20px;
}
.kb-comment-form h3 { font-size: 14px; font-weight: 600; margin-bottom: 12px; }

/* ─── ADMIN CATEGORY COLOR SWATCH ─── */
.kb-color-swatch {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 3px; flex-shrink: 0;
  vertical-align: middle;
  border: 1px solid rgba(255,255,255,0.15);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .kb-sidebar { display: none; }
  .kb-main { padding: 24px 20px; }
  .kb-topnav-search { max-width: 200px; }
}
@media (max-width: 640px) {
  .kb-login-card { padding: 32px 24px; }
  .kb-page-title { font-size: 20px; }
  .kb-cat-grid { grid-template-columns: 1fr 1fr; }
  .kb-form-grid { grid-template-columns: 1fr; }
  .kb-topnav { padding: 0 16px; }
  .kb-user-name, .kb-user-role { display: none; }
}
