/* ============================================================
   CubeItNow Wiki – Hauptstylesheet
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --orange:       #F97316;
  --orange-dark:  #EA6C0A;
  --orange-light: #FFF4ED;
  --orange-faint: #FFF9F5;
  --gray-950:  #0D0D0F;
  --gray-900:  #18181B;
  --gray-800:  #27272A;
  --gray-700:  #3F3F46;
  --gray-600:  #52525B;
  --gray-500:  #71717A;
  --gray-400:  #A1A1AA;
  --gray-300:  #D4D4D8;
  --gray-200:  #E4E4E7;
  --gray-100:  #F4F4F5;
  --gray-50:   #FAFAFA;
  --white:     #FFFFFF;
  --sidebar-w: 260px;
  --header-h:  56px;
  --radius:    8px;
  --radius-sm: 5px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow:    0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.14);
  --tr:        0.18s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--gray-50); color: var(--gray-900); line-height: 1.6; }

/* ── LOGIN ─────────────────────────────────────────────────── */
body.login-body { background: var(--gray-950); display: flex; align-items: center; justify-content: center; min-height: 100vh; }
body.login-body::before {
  content: ''; position: fixed; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(249,115,22,.18) 0%, transparent 70%);
  top: -150px; right: -150px; pointer-events: none;
}
.login-wrap { width: 100%; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card {
  background: var(--gray-900); border: 1px solid var(--gray-800);
  border-radius: 16px; padding: 48px 44px; width: 100%; max-width: 400px;
  box-shadow: 0 24px 64px rgba(0,0,0,.5); position: relative; z-index: 1;
}
.login-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 36px; }
.login-logo-mark {
  width: 36px; height: 36px; background: var(--orange); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.login-logo-mark svg { width: 20px; height: 20px; }
.login-logo-text { font-size: 1.1rem; font-weight: 700; color: var(--white); letter-spacing: -.02em; }
.login-logo-sub  { font-size: .7rem; color: var(--gray-500); letter-spacing: .08em; text-transform: uppercase; display: block; }
.login-title { font-size: 1.4rem; font-weight: 700; color: var(--white); margin-bottom: 6px; letter-spacing: -.02em; }
.login-sub   { font-size: .875rem; color: var(--gray-400); margin-bottom: 28px; }
.login-footer { margin-top: 20px; font-size: .8rem; color: var(--gray-500); text-align: center; }
.login-footer a { color: var(--orange); text-decoration: none; }

/* ── HEADER ─────────────────────────────────────────────────── */
.wiki-header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-h);
  background: var(--white); border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; gap: 16px; padding: 0 20px;
  z-index: 100; box-shadow: var(--shadow-sm);
}
.header-logo { display: flex; align-items: center; gap: 8px; width: var(--sidebar-w); flex-shrink: 0; }
.header-logo-link { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.header-logo-mark {
  width: 28px; height: 28px; background: var(--orange); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}
.header-logo-mark svg { width: 15px; height: 15px; }
.header-logo-img { max-height: 32px; }
.header-logo-text { font-size: .95rem; font-weight: 700; color: var(--gray-900); letter-spacing: -.02em; }
.header-logo-sub  { font-size: .6rem; color: var(--gray-400); font-weight: 500; letter-spacing: .07em; text-transform: uppercase; }
.header-search { flex: 1; max-width: 420px; position: relative; }
.header-search input {
  width: 100%; padding: 8px 14px 8px 36px; background: var(--gray-100);
  border: 1px solid var(--gray-200); border-radius: 20px; color: var(--gray-900);
  font-family: inherit; font-size: .875rem; outline: none; transition: all var(--tr);
}
.header-search input:focus { background: var(--white); border-color: var(--orange); box-shadow: 0 0 0 3px rgba(249,115,22,.12); }
.header-search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--gray-400); pointer-events: none; }
.search-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius);
  box-shadow: var(--shadow); z-index: 200; display: none;
}
.search-dropdown.visible { display: block; }
.search-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; text-decoration: none; color: var(--gray-800); transition: background var(--tr); }
.search-item:hover { background: var(--gray-50); }
.search-item-cat { font-size: .72rem; color: var(--gray-400); white-space: nowrap; }
.search-item-title { font-size: .875rem; font-weight: 500; flex: 1; }
.search-empty { padding: 14px; text-align: center; color: var(--gray-400); font-size: .875rem; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.header-badge { font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 20px; letter-spacing: .04em; text-transform: uppercase; }
.badge-admin    { background: rgba(249,115,22,.12); color: var(--orange); }
.badge-customer { background: rgba(82,82,91,.1); color: var(--gray-600); }
.header-user { display: flex; align-items: center; gap: 8px; font-size: .875rem; font-weight: 500; color: var(--gray-700); }
.header-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), #FB923C);
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; color: white; flex-shrink: 0;
}
.btn-logout {
  padding: 6px 14px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  background: transparent; color: var(--gray-600); font-family: inherit; font-size: .8rem; font-weight: 500;
  cursor: pointer; transition: all var(--tr); text-decoration: none; display: inline-flex; align-items: center;
}
.btn-logout:hover { background: var(--gray-100); color: var(--gray-900); border-color: var(--gray-300); }

/* ── SIDEBAR ────────────────────────────────────────────────── */
.wiki-sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  position: fixed; top: var(--header-h); bottom: 0; left: 0;
  background: var(--white); border-right: 1px solid var(--gray-200);
  overflow-y: auto; padding: 16px 0; z-index: 50;
}
.wiki-sidebar::-webkit-scrollbar { width: 4px; }
.wiki-sidebar::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 2px; }
.sidebar-section { padding: 0 12px; margin-bottom: 6px; }
.sidebar-section-label { font-size: .68rem; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: .08em; padding: 8px 8px 6px; }
.sidebar-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  border-radius: var(--radius-sm); cursor: pointer; transition: all var(--tr);
  color: var(--gray-600); font-size: .875rem; font-weight: 500; text-decoration: none; position: relative;
}
.sidebar-item:hover { background: var(--gray-100); color: var(--gray-900); }
.sidebar-item.active { background: var(--orange-light); color: var(--orange); font-weight: 600; }
.sidebar-item.active::before {
  content: ''; position: absolute; left: -12px; top: 20%; bottom: 20%;
  width: 3px; background: var(--orange); border-radius: 0 2px 2px 0;
}
.sidebar-icon { width: 17px; height: 17px; flex-shrink: 0; opacity: .8; }
.sidebar-item.active .sidebar-icon { opacity: 1; }
.sidebar-category { margin-bottom: 2px; }
.sidebar-cat-header {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border-radius: var(--radius-sm); cursor: pointer; transition: all var(--tr);
  color: var(--gray-700); font-size: .875rem; font-weight: 600; text-decoration: none;
}
.sidebar-cat-header:hover { background: var(--gray-100); }
.sidebar-cat-icon { width: 22px; height: 22px; border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: .75rem; flex-shrink: 0; }
.cat-firewall  { background: rgba(239,68,68,.12); }
.cat-telefon   { background: rgba(59,130,246,.12); }
.cat-viren     { background: rgba(34,197,94,.12); }
.cat-backup    { background: rgba(168,85,247,.12); }
.cat-microsoft { background: rgba(249,115,22,.12); }
.cat-default   { background: var(--gray-100); }
.sidebar-cat-label { flex: 1; }
.sidebar-cat-count { font-size: .7rem; color: var(--gray-400); background: var(--gray-100); padding: 1px 6px; border-radius: 10px; }
.sidebar-cat-arrow { color: var(--gray-400); font-size: .6rem; transition: transform var(--tr); }
.sidebar-category.open .sidebar-cat-arrow { transform: rotate(90deg); }
.sidebar-cat-articles { padding-left: 8px; }
.sidebar-article-item {
  display: flex; align-items: center; gap: 7px; padding: 6px 10px;
  border-radius: var(--radius-sm); cursor: pointer; transition: all var(--tr);
  color: var(--gray-500); font-size: .825rem; text-decoration: none;
}
.sidebar-article-item:hover { color: var(--gray-900); background: var(--gray-50); }
.sidebar-article-item.active { color: var(--orange); font-weight: 500; }
.sidebar-article-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gray-300); flex-shrink: 0; }
.sidebar-article-item.active .sidebar-article-dot { background: var(--orange); }
.sidebar-divider { height: 1px; background: var(--gray-100); margin: 10px 12px; }

/* ── MAIN CONTENT ────────────────────────────────────────────── */
.wiki-main { margin-left: var(--sidebar-w); margin-top: var(--header-h); flex: 1; min-height: calc(100vh - var(--header-h)); }
.page-inner { padding: 32px 40px; max-width: 900px; }
.page-title    { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); letter-spacing: -.03em; margin-bottom: 4px; }
.page-subtitle { font-size: .9rem; color: var(--gray-500); margin-bottom: 28px; }
.page-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--gray-400); margin-bottom: 14px; }
.page-breadcrumb a { color: var(--orange); text-decoration: none; }
.page-breadcrumb a:hover { text-decoration: underline; }
.page-breadcrumb span { color: var(--gray-300); }

/* ── DASHBOARD ───────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 32px; }
.stat-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 20px; transition: box-shadow var(--tr); }
.stat-card:hover { box-shadow: var(--shadow-sm); }
.stat-label { font-size: .75rem; font-weight: 600; color: var(--gray-400); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--gray-900); letter-spacing: -.04em; line-height: 1; margin-bottom: 6px; }
.stat-value span { color: var(--orange); }
.stat-change { font-size: .78rem; color: var(--gray-400); }
.stat-icon { font-size: 1.4rem; margin-bottom: 10px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-title { font-size: .95rem; font-weight: 700; color: var(--gray-800); letter-spacing: -.01em; }

/* ── RECENT ARTICLES LIST ─────────────────────────────────────── */
.recent-articles { display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; }
.recent-article-card {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 14px 18px; display: flex; align-items: center; gap: 14px;
  cursor: pointer; transition: all var(--tr); text-decoration: none; color: inherit;
}
.recent-article-card:hover { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(249,115,22,.06); }
.rec-cat-badge { font-size: .7rem; font-weight: 600; padding: 3px 9px; border-radius: 20px; white-space: nowrap; flex-shrink: 0; }
.rec-cat-badge.firewall  { background: rgba(239,68,68,.1);  color: #DC2626; }
.rec-cat-badge.telefon   { background: rgba(59,130,246,.1); color: #2563EB; }
.rec-cat-badge.viren     { background: rgba(34,197,94,.1);  color: #16A34A; }
.rec-cat-badge.backup    { background: rgba(168,85,247,.1); color: #7C3AED; }
.rec-cat-badge.microsoft { background: rgba(249,115,22,.1); color: var(--orange); }
.rec-cat-badge.default   { background: var(--gray-100);     color: var(--gray-600); }
.rec-title { font-size: .9rem; font-weight: 500; color: var(--gray-800); flex: 1; }
.rec-meta  { font-size: .78rem; color: var(--gray-400); white-space: nowrap; flex-shrink: 0; }
.rec-status { font-size: .7rem; font-weight: 600; padding: 2px 8px; border-radius: 20px; flex-shrink: 0; }
.status-published { background: rgba(34,197,94,.1);  color: #16A34A; }
.status-draft     { background: rgba(113,113,122,.1); color: var(--gray-500); }

/* ── ARTICLE VIEW ──────────────────────────────────────────────── */
.article-header { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--gray-200); }
.article-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--gray-400); margin-bottom: 14px; }
.article-breadcrumb a { color: var(--orange); text-decoration: none; }
.article-breadcrumb span { color: var(--gray-300); }
.article-title-row { display: flex; align-items: flex-start; gap: 16px; }
.article-title { font-size: 1.7rem; font-weight: 700; color: var(--gray-900); letter-spacing: -.03em; flex: 1; line-height: 1.25; }
.article-actions { display: flex; gap: 8px; flex-shrink: 0; }
.btn-action {
  display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius-sm);
  font-family: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; transition: all var(--tr);
  letter-spacing: .01em; white-space: nowrap; text-decoration: none;
}
.btn-edit { background: var(--orange); color: white; border: none; }
.btn-edit:hover { background: var(--orange-dark); }
.btn-pdf  { background: var(--white); color: var(--gray-700); border: 1px solid var(--gray-200); }
.btn-pdf:hover { background: var(--gray-100); border-color: var(--gray-300); }
.article-meta-row { display: flex; align-items: center; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.article-meta-item { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--gray-400); }

/* Article Body */
.article-body { line-height: 1.75; color: var(--gray-800); }
.article-body h2 { font-size: 1.2rem; font-weight: 700; color: var(--gray-900); margin: 28px 0 12px; letter-spacing: -.02em; }
.article-body h3 { font-size: 1rem; font-weight: 600; color: var(--gray-800); margin: 20px 0 8px; }
.article-body p  { margin-bottom: 14px; }
.article-body ul, .article-body ol { margin: 10px 0 14px 22px; }
.article-body li { margin-bottom: 6px; }
.article-body pre {
  background: var(--gray-900); color: #E2E8F0;
  border-radius: var(--radius); padding: 18px 20px;
  font-family: 'JetBrains Mono', monospace; font-size: .83rem;
  overflow-x: auto; margin: 16px 0; line-height: 1.6;
}
.article-body code {
  background: var(--gray-100); color: var(--orange-dark);
  padding: 2px 6px; border-radius: 4px;
  font-family: 'JetBrains Mono', monospace; font-size: .85em;
}
.article-body pre code { background: transparent; color: inherit; padding: 0; }
.article-body .info-box {
  background: var(--orange-faint); border-left: 3px solid var(--orange);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 14px 18px; margin: 16px 0; font-size: .9rem;
}
.article-body .info-box strong { color: var(--orange-dark); }
.article-body table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .88rem; }
.article-body th { background: var(--gray-900); color: var(--white); padding: 10px 14px; text-align: left; font-weight: 600; font-size: .8rem; }
.article-body td { padding: 9px 14px; border-bottom: 1px solid var(--gray-200); }
.article-body tr:hover td { background: var(--gray-50); }
.article-body img { max-width: 100%; border-radius: var(--radius-sm); margin: 12px 0; }
.article-body a { color: var(--orange); }
.article-footer { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--gray-200); display: flex; gap: 10px; }

/* ── CUSTOMER WELCOME ──────────────────────────────────────────── */
.welcome-banner {
  background: linear-gradient(135deg, var(--orange) 0%, #FB923C 100%);
  border-radius: var(--radius); padding: 24px 28px; margin-bottom: 28px;
  color: white; position: relative; overflow: hidden;
}
.welcome-banner::after {
  content: ''; position: absolute; right: -20px; top: -20px;
  width: 120px; height: 120px; background: rgba(255,255,255,.1); border-radius: 50%;
}
.welcome-banner h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 4px; letter-spacing: -.02em; }
.welcome-banner p  { font-size: .875rem; opacity: .85; }
.cat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.cat-card {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 18px; cursor: pointer; transition: all var(--tr); text-decoration: none; display: block;
}
.cat-card:hover { border-color: var(--orange); box-shadow: 0 4px 16px rgba(249,115,22,.1); transform: translateY(-2px); }
.cat-card-icon  { font-size: 1.6rem; margin-bottom: 10px; }
.cat-card-name  { font-size: .95rem; font-weight: 700; color: var(--gray-900); margin-bottom: 4px; }
.cat-card-count { font-size: .78rem; color: var(--gray-400); }

/* ── FORMS ──────────────────────────────────────────────────────── */
.form-group  { margin-bottom: 18px; }
.form-label  { display: block; font-size: .8rem; font-weight: 600; color: var(--gray-500); margin-bottom: 8px; letter-spacing: .04em; text-transform: uppercase; }
.form-input  {
  width: 100%; padding: 11px 14px; background: var(--gray-800); border: 1px solid var(--gray-700);
  border-radius: var(--radius-sm); color: var(--white); font-family: inherit; font-size: .95rem;
  transition: border-color var(--tr), box-shadow var(--tr); outline: none;
}
.form-input:focus  { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(249,115,22,.18); }
.form-input::placeholder { color: var(--gray-600); }
.input-light {
  width: 100%; padding: 10px 14px; background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm); color: var(--gray-800); font-family: inherit; font-size: .9rem;
  outline: none; transition: border-color var(--tr);
}
.input-light:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(249,115,22,.1); }
.input-light:read-only { background: var(--gray-50); color: var(--gray-400); }
.form-select {
  width: 100%; padding: 10px 14px; background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm); color: var(--gray-800); font-family: inherit; font-size: .9rem;
  outline: none; transition: border-color var(--tr); cursor: pointer;
}
.form-select:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(249,115,22,.1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.checkbox-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.checkbox-item { display: flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--gray-700); cursor: pointer; padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid var(--gray-200); transition: all var(--tr); }
.checkbox-item:hover { border-color: var(--orange); background: var(--orange-faint); }
.checkbox-item input[type=checkbox] { accent-color: var(--orange); width: 16px; height: 16px; }

/* ── BUTTONS ─────────────────────────────────────────────────────── */
.btn-primary {
  width: 100%; padding: 12px; background: var(--orange); border: none; border-radius: var(--radius-sm);
  color: var(--white); font-family: inherit; font-size: .95rem; font-weight: 600;
  cursor: pointer; transition: all var(--tr); letter-spacing: .01em;
}
.btn-primary:hover { background: var(--orange-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(249,115,22,.4); }
.btn-secondary {
  padding: 10px 20px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  background: var(--white); color: var(--gray-700); font-family: inherit; font-size: .875rem; font-weight: 600;
  cursor: pointer; transition: all var(--tr); text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.btn-secondary:hover { background: var(--gray-100); }
.btn-save {
  padding: 10px 20px; border: none; border-radius: var(--radius-sm); background: var(--orange);
  color: white; font-family: inherit; font-size: .875rem; font-weight: 600;
  cursor: pointer; transition: all var(--tr);
}
.btn-save:hover { background: var(--orange-dark); box-shadow: 0 4px 12px rgba(249,115,22,.35); }
.btn-danger { border-color: rgba(239,68,68,.3) !important; color: #DC2626 !important; }
.btn-danger:hover { background: rgba(239,68,68,.06) !important; }
.btn-new {
  display: flex; align-items: center; gap: 6px; padding: 9px 16px; border: none; border-radius: var(--radius-sm);
  background: var(--orange); color: white; font-family: inherit; font-size: .85rem; font-weight: 600;
  cursor: pointer; transition: all var(--tr); text-decoration: none;
}
.btn-new:hover { background: var(--orange-dark); }

/* ── TABLES ──────────────────────────────────────────────────────── */
.customers-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; }
.customers-table th { background: var(--gray-50); padding: 11px 16px; text-align: left; font-size: .75rem; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--gray-200); }
.customers-table td { padding: 13px 16px; border-bottom: 1px solid var(--gray-100); font-size: .875rem; color: var(--gray-700); vertical-align: middle; }
.customers-table tr:last-child td { border-bottom: none; }
.customers-table tr:hover td { background: var(--gray-50); }
.table-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.cat-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.cat-tag { font-size: .7rem; font-weight: 600; padding: 3px 8px; border-radius: 20px; }
.tag-firewall  { background: rgba(239,68,68,.1);  color: #DC2626; }
.tag-telefon   { background: rgba(59,130,246,.1); color: #2563EB; }
.tag-viren     { background: rgba(34,197,94,.1);  color: #16A34A; }
.tag-backup    { background: rgba(168,85,247,.1); color: #7C3AED; }
.tag-microsoft { background: rgba(249,115,22,.1); color: var(--orange); }
.btn-table-action { padding: 5px 12px; border-radius: 4px; border: 1px solid var(--gray-200); background: var(--white); color: var(--gray-600); font-family: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; margin-right: 4px; transition: all var(--tr); }
.btn-table-action:hover { background: var(--gray-100); }
.btn-table-danger { border-color: rgba(239,68,68,.3); color: #DC2626; }
.btn-table-danger:hover { background: rgba(239,68,68,.06); }
.cat-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }

/* ── MODAL ───────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 500;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal-box {
  background: var(--white); border-radius: 12px; padding: 32px 36px;
  width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-title { font-size: 1.15rem; font-weight: 700; color: var(--gray-900); margin-bottom: 24px; }

/* ── ALERTS ──────────────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: .875rem; font-weight: 500; }
.alert-success { background: rgba(34,197,94,.1); color: #15803D; border: 1px solid rgba(34,197,94,.25); }
.alert-error   { background: rgba(239,68,68,.1);  color: #B91C1C; border: 1px solid rgba(239,68,68,.25); }

/* ── EMPTY STATE ─────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 24px; color: var(--gray-400); }
.empty-icon  { font-size: 2.5rem; margin-bottom: 12px; }
.empty-text  { font-size: .95rem; }

/* ── TOAST ───────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  background: var(--gray-900); color: white; padding: 12px 18px;
  border-radius: var(--radius); font-size: .875rem; font-weight: 500;
  box-shadow: var(--shadow-lg); display: none; align-items: center; gap: 10px;
  animation: slideUp .25s ease;
}
.toast.show { display: flex; }
@keyframes slideUp { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── RESPONSIVE ──────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .cat-grid   { grid-template-columns: repeat(2,1fr); }
  .form-row   { grid-template-columns: 1fr; }
  .checkbox-grid { grid-template-columns: repeat(2,1fr); }
  .page-inner { padding: 20px; }
}
@media (max-width: 640px) {
  .wiki-sidebar { display: none; }
  .wiki-main { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .article-title-row { flex-direction: column; }
  .article-actions { flex-wrap: wrap; }
}
