/**
 * SAP Interface — Webpixels Modern Enterprise Docs & Knowledge Hub Theme
 * File: assets/css/knowledge_hub.css
 */

/* ========================================================= */
/* 0. WEBPIXELS MONOCHROME NEUTRAL DESIGN TOKENS & OVERRIDES */
/* ========================================================= */
:root {
  --sap-primary: #18181b;
  --sap-primary-hover: #27272a;
  --sap-border: #e4e4e7;
  --sap-text-primary: #18181b;
  --sap-text-secondary: #71717a;
}

.text-primary {
  color: #3f3f46 !important;
}

.fiori-btn-primary {
  background: #18181b;
  color: #ffffff;
  border-color: #18181b;
}

.fiori-btn-primary:hover {
  background: #27272a;
  border-color: #27272a;
}

.fiori-btn-secondary {
  background: #ffffff;
  color: #27272a;
  border-color: #e4e4e7;
}

.fiori-btn-secondary:hover {
  background: #fafafa;
  border-color: #d4d4d8;
  color: #18181b;
}

/* Neutralize rainbow badges across UI chrome */
.badge-primary,
.badge-success,
.badge-warning,
.badge-purple {
  background: #f4f4f5 !important;
  color: #27272a !important;
  border: 1px solid #e4e4e7 !important;
}

.erd-key-pill,
.se-pk-badge,
.se-table-chip,
.erd-type-badge {
  background: #f4f4f5 !important;
  color: #18181b !important;
  border: 1px solid #e4e4e7 !important;
}

.se-card-icon {
  background: #f4f4f5 !important;
  color: #27272a !important;
  border: 1px solid #e4e4e7;
}

.se-back-btn {
  color: #52525b !important;
}

.se-back-btn:hover {
  color: #18181b !important;
}

.fiori-card {
  border-color: #eaecf0;
  box-shadow: none;
}

.fiori-card-hover:hover {
  transform: translateY(-2px);
  border-color: #d4d4d8;
  box-shadow: 0 6px 20px -8px rgba(0, 0, 0, 0.06);
}

/* Monochrome Clean Slide Drawer Header (ERD Inspector) */
.erd-drawer-header {
  background: #ffffff !important;
  color: #18181b !important;
  border-bottom: 1px solid #eaecf0;
}

.erd-drawer-title-group p {
  color: #71717a !important;
}

.erd-drawer-icon-btn {
  background: #ffffff !important;
  border: 1px solid #e4e4e7 !important;
  color: #52525b !important;
}

.erd-drawer-icon-btn:hover {
  background: #f4f4f5 !important;
  color: #18181b !important;
  border-color: #d4d4d8 !important;
}

.erd-drawer-close {
  color: #71717a !important;
}

.erd-drawer-close:hover {
  color: #18181b !important;
}

.erd-drawer-compact-bar,
.erd-drawer.header-collapsed .erd-drawer-compact-bar {
  background: #fafafa !important;
  color: #52525b !important;
  border-bottom: 1px solid #eaecf0 !important;
}

.erd-drawer-resizer:hover .erd-drawer-resizer-line,
.erd-drawer-resizer.is-dragging .erd-drawer-resizer-line {
  background: #18181b !important;
  box-shadow: none !important;
}

.erd-drawer-resizer:hover .erd-drawer-resizer-grip,
.erd-drawer-resizer.is-dragging .erd-drawer-resizer-grip {
  border-color: #18181b !important;
  color: #18181b !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* ========================================================= */
/* 1. APP SHELL LAYOUT (LEFT SIDEBAR + WHITE SURFACE)        */
/* ========================================================= */
body.wp-docs-body {
  background-color: #f7f7f8;
  color: #18181b;
}

.wp-app-layout {
  display: flex;
  align-items: flex-start;
  min-height: calc(100vh - 26px);
  width: 100%;
}

/* Left Sidebar */
.wp-sidebar {
  width: 264px;
  min-width: 264px;
  height: calc(100vh - 26px);
  position: sticky;
  top: 0;
  background: #f7f7f8;
  display: flex;
  flex-direction: column;
  padding: 14px 12px 12px 14px;
  z-index: 60;
  transition: margin-left 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s ease;
  color: #18181b;
  box-shadow: none;
  justify-content: flex-start;
  align-items: stretch;
}

body.sidebar-collapsed .wp-sidebar {
  margin-left: -264px;
  opacity: 0;
  pointer-events: none;
}

/* Brand Switcher Row */
.wp-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 6px 12px 6px;
}

.wp-brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #0f172a;
  min-width: 0;
  flex: 1;
}

.wp-brand-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.wp-brand-icon-box img.fiori-shell-logo {
  height: 20px;
  width: 20px;
  object-fit: contain;
  border-radius: 3px;
}

.wp-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.wp-brand-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wp-brand-version {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
  line-height: 1.25;
  margin-top: 1px;
}

.wp-icon-ghost-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.wp-icon-ghost-btn:hover {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Sidebar Search Trigger */
.wp-search-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  color: #64748b;
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: all 0.15s ease;
  margin-bottom: 12px;
}

.wp-search-trigger:hover {
  border-color: #cbd5e1;
  color: #334155;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.05);
}

.wp-search-trigger-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.wp-search-trigger-left i {
  font-size: 12px;
  color: #94a3b8;
}

.wp-search-kbd {
  font-family: var(--sap-font);
  font-size: 10.5px;
  font-weight: 600;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  padding: 1px 6px;
  line-height: 1.4;
}

/* Scrollable Middle Area in Sidebar */
.wp-sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
}

.wp-sidebar-scroll::-webkit-scrollbar {
  width: 4px;
}

.wp-sidebar-scroll::-webkit-scrollbar-thumb {
  background: #dbe0e6;
  border-radius: 4px;
}

/* Pinned Top Nav Items (with boxed icons like Webpixels) */
.wp-pinned-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 12px;
}

.wp-pinned-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  text-decoration: none;
  color: #334155;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.14s ease;
}

.wp-pinned-item:hover {
  background: rgba(255, 255, 255, 0.8);
  color: #0f172a;
}

.wp-pinned-item.active {
  background: #ffffff;
  color: #0f172a;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 0 0 1px #e5e7eb;
}

.wp-pinned-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  color: #475569;
  flex-shrink: 0;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.02);
  transition: all 0.14s ease;
}

.wp-pinned-item.active .wp-pinned-icon {
  color: #18181b;
  border-color: #d4d4d8;
  background: #ffffff;
}

.wp-pill-hot {
  margin-left: auto;
  background: #fb923c;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.wp-pill-subtle {
  margin-left: auto;
  background: #eef2f6;
  color: #64748b;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 9999px;
  line-height: 1.2;
}

.wp-sidebar-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 10px 6px;
}

.wp-sidebar-section-label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  padding: 4px 8px 6px 8px;
  letter-spacing: 0.01em;
}

/* Menu / SAP Modules Accordion */
.wp-menu-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wp-menu-link,
.wp-menu-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6.5px 8px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: #475569;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  transition: all 0.14s ease;
}

.wp-menu-link:hover,
.wp-menu-btn:hover {
  background: rgba(15, 23, 42, 0.045);
  color: #0f172a;
}

.wp-menu-link.active,
.wp-menu-btn.active {
  color: #18181b;
  font-weight: 600;
  background: #ededf0;
}

.wp-menu-link i.wp-menu-ico,
.wp-menu-btn i.wp-menu-ico {
  width: 16px;
  text-align: center;
  font-size: 12.5px;
  color: #71717a;
  flex-shrink: 0;
}

.wp-menu-link.active i.wp-menu-ico,
.wp-menu-btn.active i.wp-menu-ico {
  color: #18181b;
}

.wp-menu-chevron {
  margin-left: auto;
  font-size: 10px;
  color: #94a3b8;
  transition: transform 0.18s ease;
}

.wp-menu-chevron.rotated {
  transform: rotate(90deg);
  color: #0f172a;
}

/* Nested Chapters & Subchapters Tree */
.wp-submenu-tree {
  margin: 2px 0 6px 15px;
  padding-left: 11px;
  border-left: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wp-submenu-chapter {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  padding: 6px 8px 2px 8px;
}

.wp-submenu-item {
  display: block;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12.5px;
  color: #475569;
  text-decoration: none;
  line-height: 1.35;
  transition: all 0.12s ease;
}

.wp-submenu-item:hover {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.04);
}

.wp-submenu-item.active {
  color: #18181b;
  font-weight: 600;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 0 0 1px #e4e4e7;
}

/* Sidebar Bottom System & Admin Bar */
.wp-sidebar-footer {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wp-sidebar-sys-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0 4px;
}

/* Quiet flat SAP Gateway indicator inside sidebar */
.wp-sidebar .sap-gw-mini.wp-gw-quiet {
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 6px;
  background: transparent;
  border: 1px solid transparent;
  color: #64748b;
  border-radius: 6px;
}

.wp-sidebar .sap-gw-mini.wp-gw-quiet:hover {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #0f172a;
}

.wp-sidebar .sap-gw-flyout {
  top: auto;
  bottom: calc(100% + 8px);
  left: 0;
  right: auto;
}

/* Subtle Calm Bottom Status Bar in Webpixels Shell (replaces loud #0284c7 blue bar) */
body.wp-docs-body .abap-status-bar-fixed {
  background: #f7f7f8;
  color: #52525b;
  border-top: 1px solid #e4e4e7;
  font-size: 11px;
  height: 26px;
  box-shadow: none;
}

body.wp-docs-body .abap-status-bar-fixed .status-credits,
body.wp-docs-body .abap-status-bar-fixed .status-right {
  color: #52525b;
  opacity: 1;
}

body.wp-docs-body .abap-status-bar-fixed strong,
body.wp-docs-body .abap-status-bar-fixed .status-credits strong {
  color: #18181b;
  font-weight: 600;
}

body.wp-docs-body .abap-status-bar-fixed a,
body.wp-docs-body .abap-status-bar-fixed .status-credits a,
body.wp-docs-body .abap-status-bar-fixed .status-visitor-link {
  color: #18181b;
  text-decoration: none;
  font-weight: 600;
}

body.wp-docs-body .abap-status-bar-fixed a:hover,
body.wp-docs-body .abap-status-bar-fixed .status-credits a:hover {
  color: #000000;
  text-decoration: underline;
}

body.wp-docs-body .abap-status-bar-fixed .status-icon {
  color: #52525b;
}

body.wp-docs-body .abap-status-bar-fixed .status-divider {
  color: #a1a1aa;
}

/* ========================================================= */
/* 2. MAIN WHITE CONTENT SURFACE & TOP BREADCRUMB BAR        */
/* ========================================================= */
.wp-main-surface {
  flex: 1;
  min-width: 0;
  background: #ffffff;
  margin: 8px 8px 10px 0;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.025);
  min-height: calc(100vh - 44px);
  display: flex;
  flex-direction: column;
}

body.sidebar-collapsed .wp-main-surface {
  margin-left: 8px;
}

.wp-topbar {
  height: 50px;
  padding: 0 28px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.wp-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.wp-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wp-breadcrumbs a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.14s ease;
}

.wp-breadcrumbs a:hover {
  color: #0f172a;
}

.wp-breadcrumb-sep {
  color: #cbd5e1;
  font-size: 10px;
}

.wp-breadcrumb-current {
  color: #0f172a;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wp-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.wp-topbar-search-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #64748b;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wp-topbar-search-pill:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

/* Sembunyikan search pill topbar di desktop saat sidebar terbuka (agar tidak double dengan Search sidebar) */
@media (min-width: 961px) {
  body.wp-docs-body:not(.sidebar-collapsed) .wp-topbar-search-pill {
    display: none;
  }
}

/* ========================================================= */
/* 2B. MINIMALIST DIAGRAM CATALOG (r=diagrams)               */
/* ========================================================= */
.wp-catalog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 20px;
}

.wp-catalog-title {
  font-size: 26px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 6px 0;
}

.wp-catalog-sub {
  font-size: 14px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

.wp-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.wp-filter-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.wp-filter-tab {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 5.5px 11px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.14s ease;
}

.wp-filter-tab:hover {
  color: #0f172a;
  background: #f8fafc;
}

.wp-filter-tab.active {
  background: #0f172a;
  color: #ffffff;
  font-weight: 600;
}

.wp-erd-card {
  background: #ffffff;
  border: 1px solid #eaecf0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.wp-erd-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 22px -10px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.wp-erd-thumb {
  height: 158px;
  background: #fafafa;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  text-decoration: none;
}

.wp-erd-thumb img {
  max-width: 92%;
  max-height: 92%;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.wp-erd-card:hover .wp-erd-thumb img {
  transform: scale(1.02);
}

.wp-erd-body {
  padding: 16px 18px 14px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.wp-erd-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 6px;
}

.wp-erd-kicker strong {
  color: #27272a;
  font-weight: 600;
}

.wp-erd-title {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.38;
  margin: 0 0 6px 0;
  letter-spacing: -0.01em;
}

.wp-erd-desc {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.55;
  margin: 0 0 14px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.wp-erd-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.wp-erd-open-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
  transition: color 0.14s ease;
}

.wp-erd-open-link:hover {
  color: #52525b;
}

.wp-erd-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.wp-card-icon-btn {
  height: 28px;
  min-width: 28px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.14s ease;
}

.wp-card-icon-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.wp-card-icon-btn.danger:hover {
  background: #fef2f2;
  color: #dc2626;
}

/* Sembunyikan search pill topbar di desktop saat sidebar terbuka (agar tidak double dengan Search sidebar) */
@media (min-width: 961px) {
  body.wp-docs-body:not(.sidebar-collapsed) .wp-topbar-search-pill {
    display: none;
  }
}

/* ========================================================= */
/* 2B. MINIMALIST DIAGRAM CATALOG (r=diagrams)               */
/* ========================================================= */
.wp-catalog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 20px;
}

.wp-catalog-title {
  font-size: 26px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 6px 0;
}

.wp-catalog-sub {
  font-size: 14px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

.wp-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.wp-filter-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.wp-filter-tab {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 5.5px 11px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.14s ease;
}

.wp-filter-tab:hover {
  color: #0f172a;
  background: #f8fafc;
}

.wp-filter-tab.active {
  background: #0f172a;
  color: #ffffff;
  font-weight: 600;
}

.wp-erd-card {
  background: #ffffff;
  border: 1px solid #eaecf0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.wp-erd-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 22px -10px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.wp-erd-thumb {
  height: 158px;
  background: #fafafa;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  text-decoration: none;
}

.wp-erd-thumb img {
  max-width: 92%;
  max-height: 92%;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.wp-erd-card:hover .wp-erd-thumb img {
  transform: scale(1.02);
}

.wp-erd-body {
  padding: 16px 18px 14px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.wp-erd-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 6px;
}

.wp-erd-kicker strong {
  color: #27272a;
  font-weight: 600;
}

.wp-erd-title {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.38;
  margin: 0 0 6px 0;
  letter-spacing: -0.01em;
}

.wp-erd-desc {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.55;
  margin: 0 0 14px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.wp-erd-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.wp-erd-open-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
  transition: color 0.14s ease;
}

.wp-erd-open-link:hover {
  color: #52525b;
}

.wp-erd-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.wp-card-icon-btn {
  height: 28px;
  min-width: 28px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.14s ease;
}

.wp-card-icon-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.wp-card-icon-btn.danger:hover {
  background: #fef2f2;
  color: #dc2626;
}

.wp-content-container.fiori-container {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 34px 40px 34px;
  flex: 1;
}

.wp-mobile-menu-btn {
  display: none;
}

/* ========================================================= */
/* 3. KNOWLEDGE HUB HOMEPAGE (WEBPIXELS MODERN DOCS STYLE)   */
/* ========================================================= */
.wp-hub-wrap {
  max-width: 1080px;
}

.wp-hub-hero {
  padding-bottom: 26px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 28px;
}

.wp-hub-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #3f3f46;
  background: #f4f4f5;
  border: 1px solid #e4e4e7;
  padding: 3px 10px;
  border-radius: 9999px;
  margin-bottom: 12px;
}

.wp-hub-title {
  font-size: 32px;
  font-weight: 700;
  color: #18181b;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0 0 10px 0;
}

.wp-hub-lead {
  font-size: 15px;
  color: #71717a;
  line-height: 1.65;
  max-width: 720px;
  margin: 0;
}

/* Section Headers */
.wp-section {
  margin-bottom: 36px;
}

.wp-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.wp-section-title {
  font-size: 18px;
  font-weight: 700;
  color: #18181b;
  letter-spacing: -0.015em;
  margin: 0 0 3px 0;
}

.wp-section-sub {
  font-size: 13.5px;
  color: #71717a;
  margin: 0;
}

.wp-section-link {
  font-size: 12.5px;
  font-weight: 600;
  color: #18181b;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.wp-section-link:hover {
  color: #52525b;
  text-decoration: underline;
}

/* "Good starting point" Minimalist Bare-Icon Cards (Exact Webpixels Style) */
.wp-start-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.wp-start-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #eaecf0;
  border-radius: 12px;
  padding: 24px 24px 22px 24px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.wp-start-card:hover {
  border-color: #d4d4d8;
  box-shadow: 0 6px 20px -8px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.wp-start-icon {
  color: #3f3f46;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 19px;
  margin-bottom: 18px;
  transition: color 0.16s ease;
}

.wp-start-card:hover .wp-start-icon {
  color: #18181b;
}

.wp-start-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: #18181b;
  margin: 0 0 6px 0;
  letter-spacing: -0.01em;
}

.wp-start-card p {
  font-size: 13px;
  color: #71717a;
  line-height: 1.55;
  margin: 0;
}

/* SAP Modules Grid */
.wp-modules-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.wp-module-card {
  background: #ffffff;
  border: 1px solid #eaecf0;
  border-radius: 12px;
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.18s ease;
}

.wp-module-card:hover {
  border-color: #d4d4d8;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.wp-module-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wp-module-badge-ico {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.wp-module-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.wp-module-card .wp-module-sub {
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
}

.wp-module-card p {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

.wp-module-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

/* Split Columns (Featured Articles + Featured ERD) */
.wp-two-col {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
}

.wp-doc-list-card {
  border: 1px solid #eaecf0;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.wp-doc-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none;
  color: inherit;
  transition: background 0.14s ease;
}

.wp-doc-row:last-child {
  border-bottom: none;
}

.wp-doc-row:hover {
  background: #f8fafc;
}

.wp-doc-row-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 3px;
}

.wp-doc-row:hover .wp-doc-row-title {
  color: #18181b;
}

.wp-doc-row-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Learning Paths Grid */
.wp-paths-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.wp-path-card {
  border: 1px solid #eaecf0;
  border-radius: 12px;
  padding: 20px 22px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wp-path-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}

.wp-path-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #fafafa;
  border: 1px solid #e4e4e7;
  text-decoration: none;
  color: #3f3f46;
  font-size: 12.5px;
  font-weight: 500;
  transition: all 0.14s ease;
}

.wp-path-step:hover {
  background: #f4f4f5;
  border-color: #d4d4d8;
  color: #18181b;
}

.wp-path-step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  font-size: 10.5px;
  font-weight: 700;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* "Need help?" Minimalist Support Footer */
.wp-help-footer {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.wp-help-footer h3 {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.wp-help-footer p {
  font-size: 13.5px;
  color: #64748b;
  margin: 0;
}

/* ========================================================= */
/* 4. MODULE DOCUMENTATION READER (ARTICLE + RIGHT TOC)      */
/* ========================================================= */
.wp-doc-reader-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 256px;
  gap: 40px;
  align-items: start;
}

.wp-doc-article-col {
  min-width: 0;
  max-width: 820px;
}

.wp-doc-meta-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.wp-doc-h1 {
  font-size: 29px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.022em;
  line-height: 1.25;
  margin: 0 0 12px 0;
}

.wp-doc-summary {
  font-size: 15.5px;
  color: #475569;
  line-height: 1.65;
  margin: 0 0 22px 0;
  padding-bottom: 20px;
  border-bottom: 1px solid #f1f5f9;
}

/* Rich Markdown Typography */
.wp-doc-prose {
  font-size: 14.5px;
  color: #334155;
  line-height: 1.75;
}

.wp-doc-prose .doc-heading {
  color: #0f172a;
  font-weight: 700;
  letter-spacing: -0.015em;
  scroll-margin-top: 24px;
  position: relative;
}

.wp-doc-prose .doc-h2 {
  font-size: 20px;
  margin: 30px 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.wp-doc-prose .doc-h3 {
  font-size: 16px;
  margin: 22px 0 8px 0;
}

.wp-doc-prose .doc-heading-anchor {
  opacity: 0;
  margin-left: 8px;
  color: #94a3b8;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.15s ease;
}

.wp-doc-prose .doc-heading:hover .doc-heading-anchor {
  opacity: 1;
}

.wp-doc-prose .doc-p {
  margin: 0 0 14px 0;
}

.wp-doc-prose .doc-list {
  margin: 0 0 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wp-doc-prose .doc-inline-code {
  font-family: var(--sap-font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: #18181b;
  background: #f4f4f5;
  border: 1px solid #e4e4e7;
  padding: 1px 6px;
  border-radius: 5px;
}

.wp-doc-prose .doc-table-wrap {
  margin: 16px 0 22px 0;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  overflow-x: auto;
}

.wp-doc-prose .doc-md-table th {
  background: #fafafa;
  font-size: 11.5px;
  padding: 10px 14px;
}

.wp-doc-prose .doc-md-table td {
  padding: 10px 14px;
  font-size: 13px;
}

/* Callout Boxes (Subtle Monochrome Webpixels Style) */
.doc-callout {
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid #e4e4e7;
  border-left-width: 3px;
  background: #fafafa;
}

.doc-callout-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #18181b;
  margin-bottom: 6px;
}

.doc-callout-body p {
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
  color: #3f3f46;
}

.doc-callout-list {
  margin: 6px 0 0 18px;
  font-size: 13px;
  line-height: 1.6;
}

.doc-callout-info,
.doc-callout-tip,
.doc-callout-important {
  background: #fafafa;
  border-color: #e4e4e7;
  border-left-color: #18181b;
}
.doc-callout-info .doc-callout-header,
.doc-callout-tip .doc-callout-header,
.doc-callout-important .doc-callout-header { color: #18181b; }

.doc-callout-warning {
  background: #fafafa;
  border-color: #e4e4e7;
  border-left-color: #52525b;
}
.doc-callout-warning .doc-callout-header { color: #27272a; }

/* Code Blocks (SQL / ABAP OpenSQL) */
.doc-code-block {
  margin: 16px 0 22px 0;
  border-radius: 10px;
  overflow: hidden;
  background: #18181b;
  border: 1px solid #27272a;
}

.doc-code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 14px;
  background: #27272a;
  border-bottom: 1px solid #3f3f46;
}

.doc-code-lang {
  font-family: var(--sap-font-mono);
  font-size: 11px;
  font-weight: 600;
  color: #d4d4d8;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.doc-code-copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e4e4e7;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.14s ease;
}

.doc-code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.doc-code-block pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--sap-font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: #e4e4e7;
}

/* Prev / Next Article Navigation Cards */
.wp-doc-prevnext {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid #e4e4e7;
}

.wp-prevnext-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  text-decoration: none;
  background: #ffffff;
  transition: all 0.15s ease;
}

.wp-prevnext-card:hover {
  border-color: #a1a1aa;
  background: #fafafa;
}

.wp-prevnext-card.align-right {
  text-align: right;
  align-items: flex-end;
}

.wp-prevnext-dir {
  font-size: 11px;
  font-weight: 600;
  color: #71717a;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.wp-prevnext-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #18181b;
}

/* Sticky Right Sidebar (TOC + Related Documentation) */
.wp-doc-aside-col {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.wp-toc-box,
.wp-related-box {
  border: 1px solid #e4e4e7;
  border-radius: 11px;
  padding: 14px 16px;
  background: #fafafa;
}

.wp-aside-heading {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #18181b;
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wp-toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-left: 1px solid #e4e4e7;
}

.wp-toc-link {
  display: block;
  padding: 3px 0 3px 12px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  font-size: 12px;
  color: #71717a;
  text-decoration: none;
  line-height: 1.4;
  transition: all 0.14s ease;
}

.wp-toc-link.level-3 {
  padding-left: 22px;
  font-size: 11.5px;
}

.wp-toc-link:hover,
.wp-toc-link.active {
  color: #18181b;
  border-left-color: #18181b;
  font-weight: 600;
}

.wp-rel-group {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eef2f6;
}

.wp-rel-group:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.wp-rel-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 6px;
}

.wp-rel-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.wp-rel-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--sap-font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: #fafafa;
  border: 1px solid #e4e4e7;
  color: #18181b;
  text-decoration: none;
  transition: all 0.14s ease;
}

.wp-rel-chip:hover {
  background: #f4f4f5;
  border-color: #d4d4d8;
}

/* ========================================================= */
/* 5. RELATED DOCUMENTATION PANEL (SE11 & ERD PAGES)         */
/* ========================================================= */
.wp-related-hub-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 22px;
  margin-top: 18px;
}

.wp-related-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.wp-related-subcard {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
}

.wp-related-subcard h4 {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

/* ========================================================= */
/* 6. GLOBAL COMMAND SEARCH MODAL (CTRL + K)                 */
/* ========================================================= */
.wp-cmd-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  z-index: 9990;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 64px 16px 24px 16px;
}

.wp-cmd-modal {
  width: 100%;
  max-width: 640px;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}

.wp-cmd-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid #eef2f6;
}

.wp-cmd-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 14.5px;
  color: #0f172a;
  background: transparent;
}

.wp-cmd-body {
  max-height: 430px;
  overflow-y: auto;
  padding: 10px 12px 14px 12px;
}

.wp-cmd-group-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  padding: 8px 8px 4px 8px;
}

.wp-cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: #1e293b;
  transition: background 0.12s ease;
}

.wp-cmd-item:hover {
  background: #f4f4f5;
}

/* ========================================================= */
/* 7. RESPONSIVE & EMBED MODE (?embed=1)                     */
/* ========================================================= */
body.embed-mode .wp-sidebar,
body.embed-mode .wp-topbar {
  display: none !important;
}

body.embed-mode .wp-doc-reader-layout {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 1120px) {
  .wp-modules-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wp-doc-reader-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .wp-doc-aside-col {
    position: static;
  }
}

@media (max-width: 960px) {
  .wp-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 26px;
    height: auto;
    margin-left: -280px;
    opacity: 1;
    pointer-events: auto;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
    z-index: 120;
  }

  .wp-sidebar.mobile-open {
    margin-left: 0 !important;
  }

  .wp-mobile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px);
    z-index: 110;
  }

  .wp-main-surface {
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
  }

  .wp-mobile-menu-btn {
    display: inline-flex;
  }

  .wp-expand-sidebar-btn {
    display: none !important;
  }

  .wp-topbar {
    padding: 0 16px;
  }

  .wp-content-container.fiori-container {
    padding: 20px 16px 32px 16px;
  }

  .wp-start-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wp-two-col,
  .wp-paths-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .wp-start-grid,
  .wp-modules-grid,
  .wp-doc-prevnext {
    grid-template-columns: 1fr;
  }

  .wp-hub-title,
  .wp-doc-h1 {
    font-size: 24px;
  }

  .wp-topbar-search-pill span,
  .wp-topbar-search-pill kbd {
    display: none;
  }
}
