/* ==========================================================
  260 IT Knowledge Portal — Branding and Layout
  (Clean Professional + Pizazz)
  ========================================================== */

/* ---------------------------
  Header (Purple)
  --------------------------- */
.md-header {
  background-color: #3f51b5 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25) !important;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-radius: 0 0 8px 8px;
  border-bottom: 2px solid #00C8F2 !important;
}

/* Header search / buttons hover */
.md-header .md-search__form,
.md-header .md-header__button {
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.md-header .md-search__form:hover {
  background-color: #00C8F21A !important;
  box-shadow: 0 0 0 2px #00C8F2;
}
.md-header .md-header__button:hover {
  background-color: #00C8F21A !important;
}

.md-header__button.md-logo img {
  height: 3rem !important;
  width: auto !important;
  filter: none !important;
  mix-blend-mode: normal !important;
  background: transparent !important;
  display: inline-block;
}

.md-header .md-header__title,
.md-header .md-header__title a,
.md-header .md-header__topic,
.md-header a,
.md-header button,
.md-header svg {
  color: #ffffff !important;
  fill: #ffffff !important;
}

@media (max-width: 640px) {
  .md-header {
    background-color: #3647a8 !important;
  }
}

/* Subtle bottom line under header */
.md-header:after {
  content: "";
  display: block;
  height: 1px;
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  position: absolute;
  left: 0;
  bottom: -1px;
}

/* ==========================================================
  General Typography & Layout
  ========================================================== */

.md-content {
  line-height: 1.7;
  color: var(--md-typeset-color, #1e293b);
  padding-top: 1.5rem !important;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  color: #00458C !important;
  font-weight: 800 !important;
  margin-bottom: 0.8rem;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.05);
}

.md-typeset a {
  color: #00C8F2 !important;
  text-decoration: none;
}
.md-typeset a:hover {
  text-decoration: underline;
}

/* ==========================================================
  Dashboard Cards (Admin)
  ========================================================== */

.kb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
  gap: 1.5rem !important;
  margin-top: 2rem;
}

.kb-card {
  background: #fff !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
  transition: all 0.25s ease-out !important;
  overflow: hidden;
  border: 1px solid rgba(0, 69, 140, 0.08) !important;
}
.kb-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
  border-color: #00C8F2 !important;
}

/* Icon pop on hover */
.kb-card svg {
  transition: transform 0.2s ease-in-out, fill 0.2s ease-in-out;
}
.kb-card:hover svg {
  fill: #00C8F2 !important;
  transform: scale(1.1);
}

/* Dark mode fix for cards */
[data-md-color-scheme="slate"] .kb-card,
[data-md-color-scheme="slate"] .kb-card:hover,
[data-md-color-scheme="slate"] .kb-card__link-block,
[data-md-color-scheme="slate"] .kb-card__link-block * {
  background-color: var(--md-code-bg-color) !important;
  border-color: var(--md-default-fg-color--lightest) !important;
  color: var(--md-default-fg-color--light) !important;
}

[data-md-color-scheme="slate"] .kb-card__title,
[data-md-color-scheme="slate"] .kb-card__desc,
[data-md-color-scheme="slate"] .kb-card__link {
  color: var(--md-default-fg-color--light) !important;
  opacity: 1 !important;
}

[data-md-color-scheme="slate"] .kb-card a {
  color: var(--md-default-fg-color--light) !important;
}

.kb-card__link-block {
  padding: 1.5rem 1.75rem !important;
}
.kb-card__title {
  font-size: 1.3rem !important;
  color: #00458C !important;
}
.kb-card__desc {
  opacity: 0.8 !important;
}

/* Quick action buttons on dashboard */
.kb-btn {
  background: #00458C !important;
  color: #fff !important;
  padding: 0.6rem 1.1rem !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 12px rgba(0, 69, 140, 0.3) !important;
  transition: all 0.2s ease-in-out;
}
.kb-btn:hover {
  background: #00C8F2 !important;
  box-shadow: 0 6px 16px rgba(0, 200, 242, 0.5) !important;
  transform: translateY(-2px);
}

/* Subtle animation on quick buttons */
.kb-btn {
  animation: button-pulse 1.5s infinite alternate ease-in-out;
}
@keyframes button-pulse {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0.95;
    transform: scale(1.01);
  }
}

/* ==========================================================
  Footer
  ========================================================== */

.md-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background: #f0f0f0 !important;
  padding: 1.5rem 0 !important;
  text-align: center;
  color: #334155;
  font-size: 0.9rem;
}
.md-footer a {
  color: #00458C;
  text-decoration: none;
}
.md-footer a:hover {
  color: #00C8F2;
  text-decoration: underline;
}

/* ==========================================================
  Page Tools menu (top right) + Print cleanup
  ========================================================== */

#kb-share-top {
  position: fixed;
  top: calc(var(--md-header-height, 3.2rem) + 0.3rem);
  right: max(0.6rem, env(safe-area-inset-right));
  z-index: 1400;
  pointer-events: none;
}

.page-tools {
  pointer-events: auto;
  position: relative;
}

.page-tools__toggle {
  background: #00458C;
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 69, 140, 0.3);
}

.page-tools__toggle:hover {
  background: #00C8F2;
  color: #0f172a;
}

.page-tools__menu {
  position: absolute;
  right: 0;
  margin-top: 0.25rem;
  min-width: 200px;
  background: var(--md-default-bg-color);
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.45);
  padding: 0.25rem 0;
  display: none;
}

.page-tools__menu.is-open {
  display: block;
}

.page-tools__item {
  width: 100%;
  padding: 0.4rem 0.8rem;
  text-align: left;
  background: transparent;
  border: 0;
  font-size: 0.8rem;
  cursor: pointer;
}

.page-tools__item:hover {
  background: rgba(148, 163, 184, 0.2);
}

@media print {
  /* Hide floating UI so PDFs are clean */
  #kb-share-top,
  .admin-dashboard-button,
  .download-all-button,
  nav,
  .md-nav,
  .md-sidebar,
  .client-articles-toolbar,
  #clientDirectoryList {
    display: none !important;
  }

  /* Normalize main content containers for print */
  .md-content,
  .md-typeset,
  .md-main,
  main,
  article,
  section {
    display: block !important;
    width: 100% !important;
    float: none !important;
    overflow: visible !important;
    page-break-after: auto !important;
    break-after: auto !important;
  }

  /* Disable grid/flex that can cause odd splitting in print */
  [style*="display:flex"],
  [style*="display: grid"],
  .flex,
  .grid,
  ul,
  li {
    display: block !important;
    width: 100% !important;
    float: none !important;
    overflow: visible !important;
    page-break-after: auto !important;
  }

  /* Print pack container */
  .client-print-pack {
    display: block !important;
    width: 100% !important;
    overflow: visible !important;
  }

  /* Unified wrapper: each article starts on its own page, kept together */
  .article-print-wrapper {
    page-break-before: always !important; /* legacy */
    break-before: page !important;        /* modern */
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    display: block !important;
    width: 100% !important;
    overflow: visible !important;
    margin-top: 0 !important;
    margin-bottom: 2rem !important;
  }

  /* Orphans/widows to discourage stranded lines */
  h1, h2, h3, h4, p {
    orphans: 3;
    widows: 3;
  }

  /* Page setup */
  @page {
    size: A4;
    margin: 16mm;
  }
}


/* ==========================================================
  Inline article preview + Expand all (client pages)
  ========================================================== */

.article-expand {
  margin: 0.35rem 0 0.75rem 1.5rem; /* indent under bullet */
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.02);
  display: none;
}

.article-expand.is-open {
  display: block;
}

/* Hide top H1 in expanded article preview */
.article-expand h1 {
  display: none;
}

[data-md-color-scheme="slate"] .article-expand {
  background: #121a2e !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.client-articles-toolbar {
  margin: 0.25rem 0 0.5rem 0;
  display: flex;
  justify-content: flex-end;
}

#expandAllClientArticles {
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: var(--md-default-bg-color);
  cursor: pointer;
  white-space: nowrap;
}

#expandAllClientArticles:hover {
  background: rgba(0, 0, 0, 0.06);
}

[data-md-color-scheme="slate"] #expandAllClientArticles {
  background: #121a2e !important;
  color: #e6eef7 !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

/* ==========================================================
   Clients Directory Page (/clients) – Pill Card Layout
   ========================================================== */

.clients-directory {
  margin: 2rem auto 0;
  max-width: 72rem;
}

.clients-directory__heading {
  text-align: center;
  margin-bottom: 0.75rem;
  color: #0f172a;
}

[data-md-color-scheme="slate"] .clients-directory__heading {
  color: #e5e7eb;
}

.clients-directory__search {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.clients-directory__search input {
  width: 100%;
  max-width: 420px;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  color: #0f172a;
}

.clients-directory__search input::placeholder {
  color: #94a3b8;
}

/* Dark-mode search input */
[data-md-color-scheme="slate"] .clients-directory__search input {
  background: #020617;
  border-color: rgba(148, 163, 184, 0.6);
  color: #e5e7eb;
}

[data-md-color-scheme="slate"] .clients-directory__search input::placeholder {
  color: #64748b;
}

/* Grid of pills – up to ~5–6 per row on wide screens */
#clientDirectoryList {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 1200px;

  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important;
  gap: 1rem;
  justify-items: center;
}

/* each <li> centers its pill */
#clientDirectoryList > li {
  display: flex !important;
  justify-content: center;
  width: 100%;
}

/* UPDATED: BIGGER skinny pill buttons (all same size, names wrap) */
#clientDirectoryList a {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  max-width: 280px;
  padding: 0.65rem 1.6rem;
  border-radius: 999px;

  /* NEW COLOR SCHEME */
  background: #0a3d91 !important; /* deep blue */
  color: #ffffff !important;

  font-weight: 700;
  font-size: 0.9rem;
  text-align: center;
  text-decoration: none;
  line-height: 1.25;

  white-space: normal;
  overflow: visible;

  box-shadow:
    0 6px 14px rgba(10, 20, 40, 0.25),
    0 0 0 1px rgba(10, 20, 40, 0.06);
  border: 1px solid rgba(255,255,255,0.03);

  transition:
    transform 0.08s ease,
    background-color 0.12s ease,
    filter 0.1s ease;
}

#clientDirectoryList a:hover {
  transform: translateY(-1px);
  background: #0c4bb8 !important;
}

/* NEW Dark Mode for Pills */
[data-md-color-scheme="slate"] #clientDirectoryList a {
  background: #08306a !important;
  color: #f8fafc !important;
  box-shadow:
    0 6px 14px rgba(0,0,0,0.55),
    0 0 0 1px rgba(255,255,255,0.02);
}

[data-md-color-scheme="slate"] #clientDirectoryList a:hover {
  background: #0b4ea0 !important;
}

/* Mobile tweaks */
@media (max-width: 640px) {
  .clients-directory {
    margin-top: 1.25rem;
  }

  #clientDirectoryList {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)) !important;
  }
}

/* Hide any client row that JS marks as .is-hidden */
#clientDirectoryList > li.is-hidden {
  display: none !important;
}

/* ===== Minimal: quick-action buttons & client pills only =====
   Small, reversible. Leaves other styles untouched. ===== */

/* Quick action buttons — deep blue, consistent in light & dark */
.kb-quick .kb-btn {
  background: linear-gradient(180deg, #08306a 0%, #0a3d91 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  box-shadow: 0 8px 18px rgba(6,10,30,0.28) !important;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms !important;
}

/* Slightly brighter on hover */
.kb-quick .kb-btn:hover {
  background: linear-gradient(180deg, #0b4ea0 0%, #0c58bf 100%) !important;
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(6,10,30,0.38) !important;
}

/* Client directory pills — deep blue and readable in both themes */
#clientDirectoryList a {
  background: linear-gradient(180deg, #0a3d91 0%, #08306a 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  box-shadow: 0 10px 20px rgba(6,10,30,0.36) !important;
}

/* Hover effect for pills */
#clientDirectoryList a:hover {
  background: linear-gradient(180deg,#0c4bb8,#0b4ea0) !important;
  transform: translateY(-3px);
}

/* Keep everything else as-is (no layout, spacing, or JS touched) */

/* ===========================================================
   CONTROL CENTER — Best-of-All-Worlds Modern UI Drop-In
   Paste at end of branding.css (non-destructive, overrides only)
   =========================================================== */

/* 1) Layout polish */
.kb-grid {
  gap: 1.25rem !important;
  margin: 1rem 0 1.75rem !important;
  grid-auto-rows: minmax(120px, auto); /* consistent minimum height */
}

/* 2) Card: consistent sizing, glassy surface, subtle gradient */
.kb-card {
  border-radius: 14px !important;
  border: 1px solid rgba(15,23,42,0.06) !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0.75)) !important;
  backdrop-filter: saturate(110%) blur(6px);
  box-shadow: 0 8px 28px rgba(15,23,42,0.08) !important;
  transition: transform .18s cubic-bezier(.2,.9,.3,1), box-shadow .18s ease, border-color .18s ease;
  overflow: visible !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Dark-mode card variant */
[data-md-color-scheme="slate"] .kb-card {
  background: linear-gradient(180deg, rgba(10,14,28,0.65), rgba(10,14,28,0.55)) !important;
  border: 1px solid rgba(255,255,255,0.03) !important;
  box-shadow: 0 10px 30px rgba(2,6,23,0.7) !important;
}

/* 3) Card hover & active affordance */
.kb-card:hover {
  transform: translateY(-6px) scale(1.002);
  box-shadow: 0 18px 48px rgba(15,23,42,0.12) !important;
  border-color: rgba(0,200,242,0.12) !important;
}
.kb-card:active { transform: translateY(-2px) scale(.999); }

/* 4) Card inner block padding / title styling */
.kb-card__block,
.kb-card__block, .kb-card__block /* fallbacks */ {
  padding: 1.25rem !important;
}
.kb-card__title, .kb-cardtitle {
  font-size: 1.08rem !important;
  font-weight: 800 !important;
  margin-bottom: .4rem !important;
  color: var(--md-typeset-color) !important;
  letter-spacing: .01em;
}
.kb-card__desc, .kb-carddesc {
  color: var(--kb-text-muted, #64748b) !important;
  font-size: .95rem !important;
}

/* 5) Icon badge for card tiles (left aligned) */
.kb-card__icon {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  border-radius:10px;
  margin-right:.85rem;
  background: linear-gradient(135deg, rgba(0,200,242,0.12), rgba(0,69,140,0.06));
  box-shadow: inset 0 -6px 18px rgba(255,255,255,0.03);
  font-size:1.2rem;
}

/* if you output icons inline, ensure they don't break layout */
.kb-card__title-row{ display:flex; align-items:center; gap:.6rem; }

/* 6) Quick action buttons — modern primary (deep blue) */
.kb-quick .kb-btn {
  background: linear-gradient(180deg,#062a66,#083a96) !important;
  color: #ffffff !important;
  padding: .6rem .95rem !important;
  border-radius: .85rem !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  box-shadow: 0 8px 22px rgba(10,20,40,0.14) !important;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.kb-quick .kb-btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.06);
  box-shadow: 0 14px 36px rgba(10,20,40,0.18) !important;
}
[data-md-color-scheme="slate"] .kb-quick .kb-btn {
  background: linear-gradient(180deg,#05204e,#073063) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6) !important;
}

/* 7) Typeahead (quick client search) polish */
.kb-typeahead__input, .kb-typeaheadinput {
  border-radius: 10px !important;
  padding: .7rem .9rem !important;
  border: 1px solid rgba(15,23,42,0.06) !important;
  box-shadow: none !important;
  background: rgba(255,255,255,0.92) !important;
}
[data-md-color-scheme="slate"] .kb-typeahead__input,
[data-md-color-scheme="slate"] .kb-typeaheadinput {
  background: rgba(8,10,18,0.6) !important;
  border: 1px solid rgba(255,255,255,0.04) !important;
}

/* Panel items */
.kb-typeahead__panel, .kb-typeahead__panel, .kb-typeaheadpanel {
  border-radius: 10px !important;
  border: 1px solid rgba(15,23,42,0.06) !important;
  box-shadow: 0 18px 36px rgba(15,23,42,0.12) !important;
  overflow: auto;
}
.kb-typeahead__item, .kb-typeaheaditem {
  padding: .6rem .9rem !important;
  display:flex !important;
  justify-content:space-between;
  gap:.6rem;
  align-items:center;
}
.kb-typeahead__item:hover, .kb-typeaheaditem:hover {
  background: rgba(0,200,242,0.06);
}

/* 8) Tools list card polish */
.kb-tool, .kb-tool {
  border-radius: 10px !important;
  padding: .6rem .8rem !important;
  transition: transform .12s ease, box-shadow .12s ease;
}
.kb-tool:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(15,23,42,0.12); }

/* 9) Responsive tweaks: more breathing on wide screens */
@media (min-width: 1100px){
  .kb-grid { gap: 1.5rem !important; grid-auto-rows: minmax(140px, auto); }
  .kb-card { border-radius: 16px !important; }
}

/* 10) Accessibility: focus outlines for keyboard users */
.kb-card:focus-within, .kb-quick .kb-btn:focus, .kb-tool:focus {
  outline: 3px solid rgba(0,200,242,0.12) !important;
  outline-offset: 4px;
}

/* 11) Non-destructive overrides: keep functionality intact */
.kb-btn, .kb-card__block a, .kb-card__block button { -webkit-tap-highlight-color: rgba(0,0,0,0); }

/* ============================
   END Modern UI Drop-In
   ============================ */

/* --------------------------
  Micro UI polish: drop-in enhancements
  - Small hover lift
  - Subtle animated gradient accent bar
  - Slight dark-mode readability boost
  Add this at the end of branding.css (or after the admin dashboard section)
  -------------------------- */

/* 1) Soft hover lift + refined shadow (keeps behavior identical, more "app-like") */
.kb-card {
  transition: transform 160ms cubic-bezier(.2,.9,.2,1), box-shadow 220ms ease, border-color 160ms ease;
}
.kb-card:hover {
  transform: translateY(-6px); /* subtle lift */
  box-shadow:
    0 20px 40px rgba(2,6,23,0.35),
    0 6px 18px rgba(2,6,23,0.22);
  border-color: rgba(56,189,248,0.06); /* slight highlight */
}

/* 2) Animated “breathing” accent bar on cards (uses existing ::before strip) */
.kb-card::before {
  /* keep original look but add a subtle pulse animation */
  will-change: opacity, transform;
  animation: kb-accent-pulse 5s ease-in-out infinite;
}
@keyframes kb-accent-pulse {
  0%   { opacity: 0.7; transform: translateY(0) scaleX(1); }
  50%  { opacity: 1;   transform: translateY(0) scaleX(1.02); }
  100% { opacity: 0.7; transform: translateY(0) scaleX(1); }
}

/* 3) Boost dark-mode readability for titles and desc (tiny increase in contrast) */
[data-md-color-scheme="slate"] .kb-card__title,
[data-md-color-scheme="slate"] .kb-cardtitle {
  color: #f3f8ff !important;
  text-shadow: 0 1px 0 rgba(0,0,0,0.25);
}
[data-md-color-scheme="slate"] .kb-card__desc,
[data-md-color-scheme="slate"] .kb-carddesc {
  color: #cbdff8 !important;
}

/* 4) Slight focus state for accessibility (keyboard users) */
.kb-card:focus-within,
.kb-card:focus {
  outline: none;
  box-shadow:
    0 8px 28px rgba(2,6,23,0.28),
    0 0 0 4px rgba(56,189,248,0.08); /* subtle blue halo */
}

/* 5) Optional: reduce motion for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .kb-card::before { animation: none !important; }
  .kb-card { transition: none !important; transform: none !important; }
}

/* ===== Expand Admin Dashboard Width on Desktop ===== */
@media (min-width: 1024px) {
  .md-grid:has(.kb-grid),
  .md-grid:has(#admin-dashboard),
  .md-grid:has(.control-center) {
    max-width: 2500px !important; /* try 1500–1650px depending on how wide you want */
  }
}

/* ===========================================
   UI Enhancements – Safe Drop-In Overrides
   =========================================== */

/* Subtle card hover lift */
.control-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

/* Animated left accent bar */
.control-card::before {
  transition: height 0.3s ease;
}

.control-card:hover::before {
  height: 100%;
}

/* Button hover brightness */
.control-button:hover {
  filter: brightness(1.15);
}

.client-article-tab-link {
  font-size: 0.85rem;
  color: #07b4ff;
  text-decoration: none;
}
.client-article-tab-link:hover {
  text-decoration: underline;
}

/* === Tooltip for "Open in new tab" link === */
.client-article-tab-link {
  position: relative;
  font-size: 0.85rem;
  color: #07b4ff;
  text-decoration: none;
  margin-left: 0.25rem;
}

.client-article-tab-link:hover {
  text-decoration: underline;
}

/* Tooltip text */
.client-article-tab-link::after {
  content: "Open full article in new tab";
  position: absolute;
  bottom: 125%; /* place above the icon */
  left: 50%;
  transform: translateX(-50%);
  background: #04202a;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.client-article-tab-link:hover::after {
  opacity: 1;
}

/* === Accent bar for MSP Tools links === */
.kb-tool {
  position: relative;
  padding-left: 1rem; /* space for accent bar */
}

.kb-tool::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  background: linear-gradient(180deg, var(--kb-accent-2), var(--kb-accent));
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(10,40,90,0.08);
  opacity: 0.95;
  pointer-events: none;
}

/* Dark mode variant */
[data-md-color-scheme="slate"] .kb-tool::before {
  background: linear-gradient(180deg, var(--kb-accent-2), var(--kb-accent));
}

.client-print-pack { display: none; }
@media print { .client-print-pack { display: block !important; } }

.daily-notes {
  /* Consolidated styles for the main notes block */
  grid-column: 1 / -1;
  background: #fff9c4; /* Light Yellow */
  border: 1px solid #e0c200;
  border-left: 6px solid #d4af37;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(6, 8, 15, 0.1);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  color: #0f172a;
  font-size: 0.95rem;
  line-height: 1.4;
}

.daily-notes #dailyNotesContent {
  padding: 0.5rem 1rem 0.75rem;
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.daily-notes h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
}

.daily-notes ul {
  margin: 0;
  padding-left: 1.25rem;
}

.daily-notes li {
  margin-bottom: 0.4rem;
}

.daily-notes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* --- Toggle Button Styling (Yellow Theme Enforced) --- */

/* Base style for the yellow Daily Notes toggle button */
.daily-notes-toggle, 
.core-toggle-btn {
  /* Using strong, bright yellow for the button background */
  background-color: #fcd34d; /* Yellow-400 */
  border: 1px solid #d97706; /* Darker border */
  padding: 0.5rem 1rem;
  font-weight: bold;
  font-size: 0.95rem;
  border-radius: 8px; /* Use 8px for consistency with core-toggle-btn */
  color: #1a202c; /* Dark text for contrast */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.daily-notes-toggle:hover, 
.core-toggle-btn:hover {
  /* Slightly darker yellow on hover for visual feedback */
  background-color: #f59e0b; /* Amber-500 */
}

/* Dark Mode Overrides for the Yellow Button */
@media (prefers-color-scheme: dark) {
  .daily-notes-toggle,
  .core-toggle-btn {
    background-color: #b45309; /* Dark Amber Base */
    color: #fefce8; /* Light text */
    border-color: #fcd34d; /* Light Yellow Border */
  }

  .daily-notes-toggle:hover,
  .core-toggle-btn:hover {
    background-color: #d97706; /* Darker Amber on Hover */
  }
}

/* ==========================================================
   MkDocs Header + Tabs — Unified True Black
   ========================================================== */

/* ---------- Top header ---------- */
.md-header {
  background: linear-gradient(
    180deg,
    #000000 0%,
    #0a0a0a 100%
  ) !important;

  border-bottom: 1px solid rgba(255,255,255,0.08) !important;

  box-shadow:
    0 6px 24px rgba(0,0,0,0.75),
    inset 0 -1px 0 rgba(255,255,255,0.04);
}

/* Header content color */
.md-header,
.md-header a,
.md-header button,
.md-header svg,
.md-header .md-header__title {
  color: #ffffff !important;
  fill: #ffffff !important;
}

/* Search box */
.md-header .md-search__input {
  background: rgba(255,255,255,0.08) !important;
  color: #ffffff !important;
}
.md-header .md-search__input::placeholder {
  color: rgba(255,255,255,0.6);
}

/* ---------- Tabs (HOME bar) ---------- */
.md-tabs {
  background: #000000 !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;

  box-shadow:
    0 10px 30px rgba(0,0,0,0.65);
}

/* Tab items */
.md-tabs__link {
  color: rgba(255,255,255,0.75) !important;
  font-weight: 600;
}

/* Active tab */
.md-tabs__item--active .md-tabs__link {
  color: #ffffff !important;
}

/* Hover effect */
.md-tabs__link:hover {
  color: #38bdf8 !important;
}

/* ---------- Remove residual theme tint ---------- */
.md-header[data-md-state="shadow"],
.md-tabs[data-md-state="shadow"] {
  background-color: #000000 !important;
}

/* ---------- Optional: subtle accent line ---------- */
.md-tabs::after {
  content: "";
  display: block;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(56,189,248,0.6),
    transparent
  );
}

/* ==========================================================
   THE MASTER TRUE BLACK FIX (V7 - FINAL)
   ========================================================== */

/* 1. Kill navy variables at the source */
html [data-md-color-scheme="slate"],
html [data-md-color-scheme="slate"][data-md-color-primary] {
  --md-default-bg-color: #000000 !important;
  --md-default-bg-color--light: #000000 !important;
  --md-default-bg-color--lighter: #000000 !important;
  --md-default-bg-color--lightest: #000000 !important;
}

/* 2. Force background of ALL layout layers and custom portal containers */
[data-md-color-scheme="slate"] body,
[data-md-color-scheme="slate"] .md-container,
[data-md-color-scheme="slate"] .md-main,
[data-md-color-scheme="slate"] .md-main__inner,
[data-md-color-scheme="slate"] .md-content__inner,
[data-md-color-scheme="slate"] .portal-main,
[data-md-color-scheme="slate"] .portal-layout,
[data-md-color-scheme="slate"] .portal-inner,
[data-md-color-scheme="slate"] .portal-main section,
[data-md-color-scheme="slate"] .md-content article {
  background-color: #000000 !important;
  background: #000000 !important;
  border: none !important;
  box-shadow: none !important;
}

/* 3. Daily Notes - Preserving your yellow notepad style */
[data-md-color-scheme="slate"] .daily-notes {
  background: #fff9c4 !important;
  border-left: 6px solid #d4af37 !important;
  color: #1a202c !important;
}
[data-md-color-scheme="slate"] .daily-notes #dailyNotesContent,
[data-md-color-scheme="slate"] .daily-notes h3 {
  color: #1a202c !important;
}

/* 4. Dashboard Cards - Premium Charcoal on Black */
[data-md-color-scheme="slate"] .kb-card,
[data-md-color-scheme="slate"] .md-typeset .card,
[data-md-color-scheme="slate"] .md-typeset .grid > * {
  background: linear-gradient(180deg, #121212 0%, #080808 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.2) !important;
  transition: transform 0.2s ease, border-color 0.2s ease !important;
}

/* 5. Card Hover - Subtle glow effect */
[data-md-color-scheme="slate"] .kb-card:hover {
  border-color: rgba(56, 189, 248, 0.6) !important;
  transform: translateY(-2px);
}

/* 6. Typography Contrast */
[data-md-color-scheme="slate"] .kb-card__title,
[data-md-color-scheme="slate"] .kb-cardtitle {
  color: #ffffff !important;
}
[data-md-color-scheme="slate"] .kb-card__desc,
[data-md-color-scheme="slate"] .kb-carddesc {
  color: #a0aec0 !important;
}

/* 7. Header and Tabs - Unified Black Top Bar */
[data-md-color-scheme="slate"] .md-header,
[data-md-color-scheme="slate"] .md-tabs {
  background-color: #000000 !important;
  background: #000000 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}
