/* ==========================================================================
   WIPA KNOWLEDGE PORTAL & AI GATEWAY - FLAT PRO DESIGN SYSTEM
   Clean, Minimal, High-Contrast Developer & Founder Platform
   ========================================================================== */

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

/* ==========================================================================
   DESIGN TOKENS & CSS VARIABLES
   ========================================================================== */
:root {
  /* Common typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Menlo, monospace;

  /* Common radii - Flat / Subtle Micro-radii (Atlassian 3px/4px/6px standard) */
  --radius-xs: 3px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-full: 9999px;

  /* Common transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.22s cubic-bezier(0.4, 0, 0.2, 1);

  /* Atlassian Primary Brand (Jira Blue B400 dark) */
  --accent-primary: #579DFF;
  --accent-primary-hover: #85B8FF;
  --accent-primary-subtle: #1C2B41;
  --accent-primary-text: #579DFF;

  /* Jira / Confluence Navigation & Guide Line (Dark) */
  --jira-hover: rgba(255, 255, 255, 0.06);
  --jira-active-bg: #1C2B41;
  --jira-active-text: #579DFF;
  --jira-guide-line: #282E33;

  /* Brand Accents - Vibrant Flat */
  --accent-emerald: #36B37E;
  --accent-emerald-subtle: rgba(54, 179, 126, 0.15);
  --accent-cyan: #00B8D9;
  --accent-cyan-subtle: rgba(0, 184, 217, 0.15);
  --accent-indigo: #6554C0;
  --accent-indigo-subtle: rgba(101, 84, 192, 0.15);
  --accent-amber: #FFAB00;
  --accent-amber-subtle: rgba(255, 171, 0, 0.15);
  --accent-rose: #FF5630;
  --accent-rose-subtle: rgba(255, 86, 48, 0.15);
  --accent-gold: #E5B869;
  --accent-gold-subtle: rgba(229, 184, 105, 0.15);
  --accent-sky: #38BDF8;
  --accent-sky-subtle: rgba(56, 189, 248, 0.15);
  --accent-purple: #A855F7;
  --accent-purple-subtle: rgba(168, 85, 247, 0.15);
  --accent-pink: #EC4899;
  --accent-pink-subtle: rgba(236, 72, 153, 0.15);

  /* Default Theme: Dark (Atlassian Jira / Confluence Dark) */
  color-scheme: dark;
  --bg-app: #101214;
  --bg-sidebar: #1D2125;
  --bg-surface: #14171B;
  --bg-card: #161A1D;
  --bg-card-hover: #22272B;
  --bg-card-muted: #22272B;
  --bg-input: #101214;
  --bg-popover: #1D2125;
  --bg-code: #0A0C0E;
  --bg-canvas: #14171B;

  --border-subtle: #282E33;
  --border-card: #333C48;
  --border-color: #282E33;
  --border-focus: #579DFF;

  --text-primary: #DEE4EA;
  --text-secondary: #9FADBC;
  --text-muted: #738496;
  --text-inverse: #101214;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px 0 rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px 0 rgba(0, 0, 0, 0.5);
}

/* Light Theme: Warm Slate & Soft Layered Contrast (Eye-Comfort & Anti-Glare) */
[data-theme="light"] {
  color-scheme: light;
  --bg-app: #F1F4F8;
  --bg-sidebar: #E8EDF3;
  --bg-surface: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F1F5F9;
  --bg-card-muted: #E2E8F0;
  --bg-input: #FFFFFF;
  --bg-popover: #FFFFFF;
  --bg-code: #EBF0F6;
  --bg-canvas: #F1F4F8;

  --border-subtle: #E2E8F0;
  --border-card: #D0D7E2;
  --border-color: #E2E8F0;
  --border-focus: #0284C7;

  --text-primary: #0F172A;
  --text-secondary: #334155;
  --text-muted: #64748B;
  --text-inverse: #FFFFFF;

  /* Primary Accent Brand (Rich Azure Blue) */
  --accent-primary: #0284C7;
  --accent-primary-hover: #0369A1;
  --accent-primary-subtle: #E0F2FE;
  --accent-primary-text: #0284C7;

  /* Jira / Confluence Navigation & Guide Line (Light) */
  --jira-hover: rgba(15, 23, 42, 0.05);
  --jira-active-bg: #E0F2FE;
  --jira-active-text: #0284C7;
  --jira-guide-line: #CBD5E1;

  /* Warm Pastel Accents with Deep Readable Text */
  --accent-emerald: #059669;
  --accent-emerald-subtle: rgba(5, 150, 105, 0.1);
  --accent-cyan: #0284C7;
  --accent-cyan-subtle: rgba(2, 132, 199, 0.1);
  --accent-indigo: #4F46E5;
  --accent-indigo-subtle: rgba(79, 70, 229, 0.1);
  --accent-amber: #D97706;
  --accent-amber-subtle: rgba(217, 119, 6, 0.1);
  --accent-gold: #B45309;
  --accent-gold-subtle: rgba(180, 83, 9, 0.1);
  --accent-sky: #0284C7;
  --accent-sky-subtle: rgba(2, 132, 199, 0.1);
  --accent-purple: #7C3AED;
  --accent-purple-subtle: rgba(124, 58, 237, 0.1);
  --accent-pink: #DB2777;
  --accent-pink-subtle: rgba(219, 39, 119, 0.1);
  --accent-rose: #DC2626;
  --accent-rose-subtle: rgba(220, 38, 38, 0.1);

  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.05), 0 1px 2px -1px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.55;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

body.app-body {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  text-align: inherit;
  outline: none;
  box-shadow: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Crisp Scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-card) transparent;
}
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-card);
  border-radius: var(--radius-xs);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ==========================================================================
   APP SHELL: LEFT SIDEBAR NAVIGATION
   ========================================================================== */
.app-sidebar {
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  z-index: 100;
  transition: width var(--transition-normal), transform var(--transition-normal);
  user-select: none;
}

.sidebar-header {
  height: 56px;
  min-height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  overflow: hidden;
}

.brand-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #241D10 0%, #15181B 100%);
  border: 1px solid rgba(212, 175, 55, 0.45);
  color: #F7D36B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.05em;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 248, 214, 0.25);
  overflow: hidden;
  transition: var(--transition-fast);
}

.brand-icon img,
.brand-icon svg {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
}

.sidebar-brand:hover .brand-icon {
  border-color: rgba(255, 215, 0, 0.7);
  box-shadow: 0 0 10px rgba(245, 208, 97, 0.35);
  transform: scale(1.03);
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  white-space: nowrap;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 0.90rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.brand-subtitle {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.sidebar-collapse-toggle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sidebar-collapse-toggle:hover {
  background: var(--jira-hover);
  color: var(--text-primary);
}

/* Sidebar Action CTA - Jira Blue + Create Button */
.sidebar-cta-wrap {
  padding: 10px 12px 6px;
}

.btn-sidebar-create {
  width: 100%;
  height: 32px;
  padding: 0 12px;
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-sidebar-create:hover {
  background: var(--accent-primary-hover);
}

.btn-sidebar-create:active {
  transform: translateY(1px);
}

/* Sidebar Content & Navigation */
.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 6px 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-group-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 6px 8px 2px;
}

.sidebar-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px 2px;
}

.sidebar-group-header .sidebar-group-title {
  padding: 0;
}

.sidebar-group-header .btn-icon-xs {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  transition: all var(--transition-fast);
  background: transparent;
  border: none;
  cursor: pointer;
}

.sidebar-group-header .btn-icon-xs:hover {
  background: var(--jira-hover);
  color: var(--text-primary);
}

.sidebar-nav-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar-nav-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 32px;
  height: auto;
  padding: 6px 10px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  position: relative;
  box-sizing: border-box;
}

.sidebar-nav-item:hover {
  background: var(--jira-hover);
  color: var(--text-primary);
}

.sidebar-nav-item.active {
  background: var(--jira-active-bg);
  color: var(--jira-active-text);
  font-weight: 600;
  border-left: 3px solid var(--accent-primary);
  padding-left: 7px;
}

.nav-icon {
  flex-shrink: 0;
  stroke: currentColor;
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.nav-text {
  flex: 1;
  white-space: normal;
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: break-word;
}

.nav-pill {
  font-size: 0.70rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  line-height: 14px;
}

.sidebar-nav-item.active .nav-pill {
  background: var(--accent-primary);
  border-color: transparent;
  color: #ffffff;
}

/* ==========================================================================
   CONFLUENCE PAGE TREE IN SIDEBAR (FLAT, CLEAN, ZERO CARD OUTLINES)
   ========================================================================== */
.sidebar-projects-tree {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
}

/* Project Parent Node - Pure Flat, No Card Borders */
.sidebar-project-node {
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  margin-bottom: 2px;
}

.sidebar-project-node.active-project {
  border: none;
  background: transparent;
}

/* Project Header Row - Clean Flat Tree Button */
/* Project Header Row - Clean Flat Tree Node with Multi-line Wrapping */
.sidebar-project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  min-height: 34px;
  height: auto;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background var(--transition-fast);
  text-align: left;
  color: var(--text-primary);
  gap: 6px;
  box-sizing: border-box;
}

.sidebar-project-header:hover {
  background: var(--jira-hover);
}

.sidebar-project-node.active-project > .sidebar-project-header {
  color: var(--text-primary);
  font-weight: 600;
}

.sidebar-project-node.active-project:not(.expanded) > .sidebar-project-header {
  background: var(--jira-active-bg);
  color: var(--jira-active-text);
}

.sidebar-project-title-group {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  overflow: visible;
  flex: 1;
  min-width: 0;
}

.sidebar-project-chevron {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
  margin-top: 3px;
}

.sidebar-project-node.expanded .sidebar-project-chevron {
  transform: rotate(90deg);
}

.sidebar-project-icon {
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 1px;
}

.sidebar-project-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: inherit;
  white-space: normal;
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: break-word;
  flex: 1;
}

/* Action group on project row: Quick terms edit button + Count badge */
.sidebar-project-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Quick Terminology Edit Button shown on hover of project */
.btn-project-terms-quick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-xs, 4px);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #10B981;
  font-size: 0.75rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.15s ease;
  padding: 0;
  line-height: 1;
}

.sidebar-project-header:hover .btn-project-terms-quick,
.sidebar-project-header:focus-within .btn-project-terms-quick {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.btn-project-terms-quick:hover {
  background: #10B981;
  color: #061A14;
  border-color: #10B981;
  transform: scale(1.08);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.35);
}

/* Jira Lozenge Badge for File Count */
.sidebar-project-count {
  font-size: 0.69rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0 5px;
  line-height: 16px;
  flex-shrink: 0;
}

/* Nested Child Pages Tree - Clean Minimalist List */
.sidebar-project-items {
  display: none;
  padding: 2px 0 4px 4px;
  margin-left: 4px;
  border-left: none;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
}

.sidebar-project-node.expanded .sidebar-project-items {
  display: flex;
}

.sidebar-project-pages-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

/* Confluence Child Page Row - Flat, Reset Button, Multi-line wrapping */
.sidebar-file-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  width: 100%;
  min-height: 28px;
  height: auto;
  padding: 5px 8px;
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-size: 0.79rem;
  font-weight: 400;
  background: transparent;
  border: none;
  border-left: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  box-sizing: border-box;
}

.sidebar-file-item:hover {
  background: var(--jira-hover);
  color: var(--text-primary);
  border-left-color: rgba(16, 185, 129, 0.5);
}

.sidebar-file-item.active-file {
  background: var(--jira-active-bg);
  color: var(--jira-active-text);
  font-weight: 600;
  border-left-color: var(--accent-emerald, #10B981);
}

.sidebar-file-icon {
  font-size: 0.85rem;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 1px;
  color: var(--text-muted, #64748B);
  transition: color var(--transition-fast, 0.15s ease);
}

.sidebar-file-icon .sidebar-svg-icon {
  width: 15px;
  height: 15px;
  stroke: currentColor;
}

.sidebar-file-item:hover .sidebar-file-icon,
.sidebar-file-item.active-file .sidebar-file-icon {
  color: var(--accent-emerald, #10B981);
}

.sidebar-file-label {
  white-space: normal;
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: break-word;
  flex: 1;
  min-width: 0;
}

.sidebar-tree-loading {
  padding: 12px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-sidebar);
}

.sidebar-status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
}

.sidebar-footer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 8px;
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.footer-action-btn:hover {
  background: var(--bg-card);
  border-color: var(--border-card);
  color: var(--text-primary);
}

/* Collapsed Sidebar State */
.app-sidebar.collapsed {
  width: 64px;
  min-width: 64px;
  max-width: 64px;
}

.app-sidebar.collapsed .brand-text-wrap,
.app-sidebar.collapsed .cta-label,
.app-sidebar.collapsed .sidebar-group-title,
.app-sidebar.collapsed .sidebar-group-header,
.app-sidebar.collapsed .nav-text,
.app-sidebar.collapsed .nav-pill,
.app-sidebar.collapsed .sidebar-project-name,
.app-sidebar.collapsed .sidebar-project-count,
.app-sidebar.collapsed .sidebar-project-chevron,
.app-sidebar.collapsed .sidebar-project-actions,
.app-sidebar.collapsed .sidebar-project-items,
.app-sidebar.collapsed .sidebar-user-meta,
.app-sidebar.collapsed .sidebar-user-actions,
.app-sidebar.collapsed .sidebar-user-action-btn,
.app-sidebar.collapsed .status-label,
.app-sidebar.collapsed .footer-action-btn span {
  display: none !important;
}

.app-sidebar.collapsed .sidebar-header {
  padding: 0;
  justify-content: center;
  position: relative;
}

.app-sidebar.collapsed .sidebar-brand {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.app-sidebar.collapsed .brand-icon {
  width: 32px;
  height: 32px;
  font-size: 0.95rem;
  border-radius: 8px;
}

/* User requirement 1: Bấm hamburger mở ra, không hiển thị thêm nút > */
.app-sidebar.collapsed .sidebar-collapse-toggle {
  display: none !important;
}

/* User requirement 2: Project buttons have icon! In collapsed state, show clean icon button */
.app-sidebar.collapsed .sidebar-projects-tree {
  padding: 0 4px;
}

.app-sidebar.collapsed .sidebar-project-node {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
}

.app-sidebar.collapsed .sidebar-project-header {
  justify-content: center !important;
  padding: 0 !important;
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  margin: 0 auto !important;
  border-radius: var(--radius-sm) !important;
  background: var(--bg-card-muted) !important;
  border: 1px solid var(--border-subtle) !important;
  transition: all var(--transition-fast) !important;
}

.app-sidebar.collapsed .sidebar-project-header:hover {
  background: var(--bg-card-hover) !important;
  border-color: var(--accent-primary) !important;
  transform: scale(1.06);
}

.app-sidebar.collapsed .sidebar-project-node.active-project .sidebar-project-header {
  background: var(--accent-primary-subtle) !important;
  border-color: var(--accent-primary) !important;
  color: var(--accent-primary) !important;
}

.app-sidebar.collapsed .sidebar-project-title-group {
  justify-content: center !important;
  flex: none !important;
  gap: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

.app-sidebar.collapsed .sidebar-project-icon {
  font-size: 1.2rem !important;
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Also show topbar toggle button on desktop when sidebar is collapsed */
.app-sidebar.collapsed ~ .app-main-layout .mobile-menu-toggle {
  display: flex !important;
}

.app-sidebar.collapsed .sidebar-nav-item {
  justify-content: center;
  padding: 8px 0;
}

.app-sidebar.collapsed .btn-sidebar-create {
  padding: 8px;
}

/* Mobile Sidebar Backdrop */
.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 98;
}

.sidebar-backdrop.active {
  display: block;
}

/* ==========================================================================
   MAIN LAYOUT & TOPBAR
   ========================================================================== */
.app-main-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg-app);
}

.app-topbar {
  height: 52px;
  min-height: 52px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-card);
  z-index: 90;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.mobile-menu-toggle {
  display: flex;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.mobile-menu-toggle:hover {
  background: var(--jira-hover);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.breadcrumb-root {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.breadcrumb-sep {
  color: var(--text-muted);
  opacity: 0.5;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.breadcrumb-current {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

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

/* Jira Style Chip & Buttons in Topbar */
.topbar-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.topbar-chip-btn:hover {
  background: var(--jira-hover);
  border-color: var(--border-card);
  color: var(--text-primary);
}

.topbar-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent-primary);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.topbar-link-btn:hover {
  background: var(--accent-primary-subtle);
  border-color: var(--accent-primary);
}

/* Atlassian Segmented Control (Theme: System | Light | Dark) */
.theme-segmented-control {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.theme-segment-btn {
  background: transparent;
  border: none;
  border-radius: 3px;
  padding: 4px 8px;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
}

.theme-segment-btn:hover {
  color: var(--text-primary);
}

.theme-segment-btn.active {
  background: var(--bg-card);
  color: var(--accent-primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  font-weight: 600;
}

.theme-segment-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Flat Pro Language Switcher (VI | EN) */
.btn-lang-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
  cursor: pointer;
  gap: 2px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.btn-lang-toggle:hover {
  border-color: var(--border-card);
}

.lang-opt {
  padding: 4px 7px;
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.lang-opt.active {
  background: var(--bg-card);
  color: var(--accent-emerald);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* App Content Area */
.app-content-container {
  flex: 1;
  overflow-y: auto;
  position: relative;
  background-color: var(--bg-app);
}

.view-panel {
  display: none;
  padding: 14px 18px 32px;
  max-width: 100%;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.view-panel.active {
  display: block;
  animation: fadeIn 0.18s ease-in-out;
}

#view-workspace.view-panel {
  padding: 0;
  max-width: none;
  height: calc(100vh - 52px);
  overflow: hidden;
}

#view-workspace.view-panel.active {
  display: flex;
  flex-direction: column;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Section Header Utility */
.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-title-wrap h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.section-title-wrap p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   COMMON FLAT BUTTONS & BADGES
   ========================================================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--accent-primary);
  color: #ffffff;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--bg-card-muted);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-secondary:hover {
  background: var(--jira-hover);
  border-color: var(--border-card);
}

.btn-secondary:active {
  transform: translateY(1px);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.78rem;
}

.btn-icon-sm, .btn-icon-xs {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon-sm {
  width: 32px;
  height: 32px;
}

.btn-icon-xs {
  width: 24px;
  height: 24px;
}

.btn-icon-sm:hover, .btn-icon-xs:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card);
  color: var(--text-primary);
}

.btn-text-only {
  background: transparent;
  border: none;
  color: var(--accent-emerald);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0;
}

.btn-text-only:hover {
  text-decoration: underline;
}

/* Badges */
.badge, .brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-mono);
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.badge.accent-cyan {
  background: var(--accent-cyan-subtle);
  border-color: rgba(2, 132, 199, 0.25);
  color: var(--accent-cyan);
}

.badge.accent-emerald {
  background: var(--accent-emerald-subtle);
  border-color: rgba(16, 185, 129, 0.25);
  color: var(--accent-emerald);
}

.badge.accent-indigo {
  background: var(--accent-indigo-subtle);
  border-color: rgba(99, 102, 241, 0.25);
  color: var(--accent-indigo);
}

/* ==========================================================================
   WIPA & CVNS DESIGN SYSTEM COMPONENTS (THEME-ADAPTIVE)
   ========================================================================== */

/* Universal Responsive Grids */
.wipa-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.wipa-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.wipa-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

@media (max-width: 768px) {
  .wipa-grid-2, .wipa-grid-3, .wipa-grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Base WIPA Card Container */
.wipa-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md, 10px);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  color: var(--text-primary);
}

.wipa-card:hover {
  border-color: var(--border-card);
}

/* Accent Card Variations */
.cvns-jade-card {
  border-left: 3px solid var(--accent-emerald);
}

.cvns-gold-card {
  border-left: 3px solid var(--accent-gold);
}

.cvns-sky-card {
  border-left: 3px solid var(--accent-sky);
}

/* CVNS Badges */
.cvns-badge-jade {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--accent-emerald-subtle);
  border: 1px solid rgba(5, 150, 105, 0.25);
  color: var(--accent-emerald);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.cvns-badge-gold {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--accent-amber-subtle);
  border: 1px solid rgba(217, 119, 6, 0.25);
  color: var(--accent-gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.cvns-badge-sky {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--accent-cyan-subtle);
  border: 1px solid rgba(2, 132, 199, 0.25);
  color: var(--accent-sky);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.cvns-badge-rose {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--accent-rose-subtle);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: var(--accent-rose);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.cvns-btn-pill {
  border-radius: var(--radius-full) !important;
}

/* Interactive 1-Click Outcome Choice Buttons */
.outcome-choice-btn {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md, 8px);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  box-sizing: border-box;
  color: var(--text-secondary);
}

.outcome-choice-btn:hover {
  border-color: var(--border-card);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.outcome-choice-btn:active {
  transform: translateY(0);
}

.outcome-choice-btn .choice-title {
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.outcome-choice-btn .choice-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Active State Styles by Column Category */
.outcome-choice-btn.active.choice-blue {
  background: var(--accent-cyan-subtle) !important;
  border: 1.5px solid var(--accent-cyan) !important;
  box-shadow: 0 0 0 1px var(--accent-cyan);
}
.outcome-choice-btn.active.choice-blue .choice-title {
  color: var(--accent-cyan) !important;
}
.outcome-choice-btn.active.choice-blue .choice-desc {
  color: var(--text-primary) !important;
}

.outcome-choice-btn.active.choice-gold {
  background: var(--accent-amber-subtle) !important;
  border: 1.5px solid var(--accent-gold) !important;
  box-shadow: 0 0 0 1px var(--accent-gold);
}
.outcome-choice-btn.active.choice-gold .choice-title {
  color: var(--accent-gold) !important;
}
.outcome-choice-btn.active.choice-gold .choice-desc {
  color: var(--text-primary) !important;
}

.outcome-choice-btn.active.choice-green {
  background: var(--accent-emerald-subtle) !important;
  border: 1.5px solid var(--accent-emerald) !important;
  box-shadow: 0 0 0 1px var(--accent-emerald);
}
.outcome-choice-btn.active.choice-green .choice-title {
  color: var(--accent-emerald) !important;
}
.outcome-choice-btn.active.choice-green .choice-desc {
  color: var(--text-primary) !important;
}

.outcome-choice-btn.choice-red .choice-title {
  color: var(--accent-rose);
}
.outcome-choice-btn.choice-gold .choice-title {
  color: var(--accent-gold);
}
.outcome-choice-btn.choice-blue .choice-title {
  color: var(--accent-sky);
}
.outcome-choice-btn.choice-green .choice-title {
  color: var(--accent-emerald);
}

/* Live Outcome Dashboard (Result Box) */
.cvns-result-box,
#reflection-result-box {
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-md, 12px);
  padding: 22px;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  color: var(--text-primary);
}

[data-theme="dark"] .cvns-result-box,
[data-theme="dark"] #reflection-result-box {
  background: #0F172A;
  border-color: rgba(229, 184, 105, 0.35);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .cvns-result-box,
[data-theme="light"] #reflection-result-box {
  background: #FFFFFF;
  border-color: #CBD5E1;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
}

/* Sub-action deliverable cards in result box */
.reflection-deliverable-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm, 6px);
  padding: 12px 14px;
  transition: background var(--transition-fast);
}

.reflection-deliverable-item:hover {
  background: var(--bg-card-hover);
}

/* Workspace Audience Segmented Tabs Bar */
.workspace-audience-tabs-bar {
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 16px;
  display: flex;
  align-items: center;
}

.audience-tabs-container {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm, 6px);
  padding: 3px;
}

.audience-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-xs, 4px);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.audience-tab-btn:hover {
  color: var(--text-primary);
  background: var(--jira-hover);
}

.audience-tab-btn.active {
  background: var(--bg-card);
  color: var(--accent-primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

.audience-tab-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.audience-tab-btn.active .audience-tab-badge {
  background: var(--accent-primary-subtle);
  border-color: rgba(2, 132, 199, 0.3);
  color: var(--accent-primary);
}

/* Workspace Submenu Pills Bar */
.workspace-submenu-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 16px;
}

.workspace-submenu-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.workspace-submenu-scroll::-webkit-scrollbar {
  display: none;
}

.workspace-submenu-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.workspace-submenu-pill:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card);
  color: var(--text-primary);
}

.workspace-submenu-pill.active {
  background: var(--accent-primary-subtle);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  font-weight: 700;
}

/* ==========================================================================
   VIEW 1: DASHBOARD
   ========================================================================== */
.dashboard-hero {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px 36px;
  margin-bottom: 24px;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--accent-emerald-subtle);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--accent-emerald);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.dashboard-title {
  font-family: var(--font-heading);
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.dashboard-title .gradient-text {
  color: var(--accent-emerald);
}

.dashboard-subtitle {
  font-size: 0.98rem;
  color: var(--text-secondary);
  max-width: 820px;
  margin-bottom: 28px;
  line-height: 1.6;
}

/* Metrics Grid - Flat Pro Cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.metric-card {
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  position: relative;
  transition: all var(--transition-fast);
}

.metric-card:hover {
  border-color: var(--border-card);
  background: var(--bg-card-hover);
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--card-border-color, var(--accent-emerald));
  border-top-left-radius: var(--radius-sm);
  border-bottom-left-radius: var(--radius-sm);
}

.metric-card.accent-cyan { --card-border-color: var(--accent-cyan); }
.metric-card.accent-emerald { --card-border-color: var(--accent-emerald); }
.metric-card.accent-indigo { --card-border-color: var(--accent-indigo); }
.metric-card.accent-amber { --card-border-color: var(--accent-amber); }

.metric-value {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 6px;
}

.metric-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Dashboard Strategic Pillars */
.dashboard-pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
}

.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all var(--transition-fast);
}

.pillar-card:hover {
  border-color: var(--border-card);
  box-shadow: var(--shadow-sm);
}

.pillar-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle);
  color: var(--accent-emerald);
}

.pillar-icon-wrap.accent-cyan {
  color: var(--accent-cyan);
  background: var(--accent-cyan-subtle);
  border-color: rgba(2, 132, 199, 0.2);
}

.pillar-icon-wrap.accent-emerald {
  color: var(--accent-emerald);
  background: var(--accent-emerald-subtle);
  border-color: rgba(16, 185, 129, 0.2);
}

.pillar-card h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.pillar-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.pillar-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.pillar-feat-item {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.pillar-feat-item strong {
  color: var(--text-primary);
}

.pillar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}

/* ==========================================================================
   VIEW 2: PROJECT SHOWCASE GALLERY
   ========================================================================== */
.showcase-controls {
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.domain-filter-pills, .module-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.showcase-layout-switcher {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 4px;
}

.layout-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.layout-toggle-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.layout-toggle-btn.active {
  background: var(--accent-emerald);
  color: #ffffff;
}

.module-pill {
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.module-pill:hover {
  border-color: var(--border-card);
  color: var(--text-primary);
}

.module-pill.active {
  background: var(--accent-emerald);
  border-color: transparent;
  color: #ffffff;
  font-weight: 600;
}

/* ==========================================================================
   SHOWCASE GRID & CARDS (BỐ TRÍ NGANG & DỌC)
   ========================================================================== */
.showcase-grid {
  width: 100%;
  transition: all var(--transition-fast);
}

/* 1. BỐ TRÍ NGANG (Horizontal List Card - Tinh gọn, fit block, không choán màn hình) */
.showcase-grid.layout-horizontal {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.showcase-grid.layout-horizontal .showcase-card {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  max-width: 1080px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  gap: 20px;
  overflow: hidden;
  position: relative;
  transition: all var(--transition-fast);
}

.showcase-grid.layout-horizontal .showcase-banner-wrap {
  width: 155px;
  min-width: 155px;
  max-width: 155px;
  height: 220px;
  max-height: 220px;
  aspect-ratio: 1 / 1.414;
  position: relative;
  overflow: hidden;
  background: #0f1218;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(229, 184, 105, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
}

.showcase-grid.layout-horizontal .showcase-banner-top-tags {
  top: 8px;
  left: 8px;
  right: 8px;
}

.showcase-grid.layout-horizontal .showcase-banner-top-tags .showcase-domain-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  max-width: 90px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.showcase-grid.layout-horizontal .showcase-logo-badge {
  bottom: 8px;
  left: 8px;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  padding: 4px;
}

.showcase-grid.layout-horizontal .showcase-card-body {
  flex: 1;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

/* 2. BỐ TRÍ DỌC (Vertical Grid - Giới hạn max-width 460px không bung quá đà) */
.showcase-grid.layout-vertical {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 460px));
  justify-content: flex-start;
  gap: 24px;
}

.showcase-grid.layout-vertical .showcase-card {
  max-width: 460px;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  transition: all var(--transition-fast);
}

.showcase-grid.layout-vertical .showcase-banner-wrap {
  width: 100%;
  height: 180px;
  max-height: 180px;
  position: relative;
  overflow: hidden;
  background: #0f1218;
}

.showcase-grid.layout-vertical .showcase-card-body {
  padding: 16px 20px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

/* Hiệu ứng tương tác chung cho Card */
.showcase-card:hover {
  border-color: rgba(229, 184, 105, 0.45);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

.showcase-banner-img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
  display: block;
}

.showcase-card:hover .showcase-banner-img {
  transform: scale(1.04);
}

.showcase-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 15, 25, 0.45) 0%, rgba(11, 15, 25, 0.15) 40%, rgba(11, 15, 25, 0.9) 100%);
  pointer-events: none;
}

.showcase-banner-top-tags {
  position: absolute;
  top: 12px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

.showcase-banner-top-tags .showcase-domain-badge {
  backdrop-filter: blur(8px);
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.showcase-logo-badge {
  position: absolute;
  bottom: 12px;
  left: 16px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #11141b;
  border: 1.5px solid rgba(229, 184, 105, 0.5);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  padding: 6px;
}

.showcase-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 860px) {
  .showcase-grid.layout-horizontal .showcase-card {
    flex-direction: column;
  }
  .showcase-grid.layout-horizontal .showcase-banner-wrap {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: 180px;
    min-height: 180px;
  }
}

.showcase-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.showcase-title {
  font-family: var(--font-heading);
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.35;
}

.showcase-tagline {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.showcase-domain-badge {
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: var(--accent-cyan-subtle);
  border: 1px solid rgba(2, 132, 199, 0.2);
  color: var(--accent-cyan);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.showcase-author-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(229, 184, 105, 0.1);
  border: 1px solid rgba(229, 184, 105, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 4px;
  flex-shrink: 0;
}

.showcase-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Offer Box in Showcase */
.showcase-offer-box {
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.showcase-offer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.showcase-offer-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-emerald);
}

.showcase-offer-price {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.showcase-offer-promise {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Pains Box */
.showcase-pains-box {
  padding: 10px 14px;
  background: var(--accent-rose-subtle);
  border: 1px solid rgba(225, 29, 72, 0.2);
  border-radius: var(--radius-sm);
}

.showcase-pains-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-rose);
  margin-bottom: 4px;
}

.showcase-pains-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Ecosystem Tiers */
.showcase-ecosystem-tiers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.showcase-tier-pill {
  font-size: 0.72rem;
  padding: 2px 7px;
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
}

.showcase-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   SHOWCASE OFFER IMAGES SLIDESHOW GALLERY
   ========================================================================== */
.showcase-offer-gallery {
  position: relative;
  width: 100%;
  border-radius: var(--radius-sm);
  background: #0d1117;
  border: 1px solid rgba(229, 184, 105, 0.25);
  overflow: hidden;
  margin-top: 4px;
}

.gallery-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  background: rgba(15, 23, 42, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent-gold);
}

.gallery-slides-wrap {
  position: relative;
  width: 100%;
  height: 175px;
  overflow: hidden;
  background: #090c10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0a0d14;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-slide img:hover {
  transform: scale(1.02);
}

.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(229, 184, 105, 0.4);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  backdrop-filter: blur(6px);
  transition: all var(--transition-fast);
  font-size: 0.85rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.gallery-nav-btn:hover {
  background: var(--accent-gold);
  color: #000000;
  border-color: var(--accent-gold);
  transform: translateY(-50%) scale(1.08);
}

.gallery-nav-btn.prev {
  left: 8px;
}

.gallery-nav-btn.next {
  right: 8px;
}

.gallery-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  background: rgba(15, 23, 42, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  gap: 8px;
}

.gallery-controls-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gallery-play-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-secondary);
  border-radius: 4px;
  cursor: pointer;
  padding: 2px 7px;
  font-size: 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
}

.gallery-play-btn:hover {
  background: rgba(229, 184, 105, 0.2);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.gallery-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.gallery-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.gallery-dot.active {
  background: var(--accent-gold);
  width: 18px;
  border-radius: 4px;
}

.gallery-cover-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(229, 184, 105, 0.5);
  color: var(--accent-gold);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  backdrop-filter: blur(6px);
  z-index: 4;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.gallery-zoom-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.gallery-zoom-hint:hover {
  color: var(--accent-gold);
}

/* ==========================================================================
   IMAGE LIGHTBOX MODAL & MEDIA UPLOAD MODAL
   ========================================================================== */
.image-lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.image-lightbox-modal.open {
  display: flex;
}

.lightbox-content-box {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.lightbox-close-btn {
  position: absolute;
  top: -42px;
  right: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all var(--transition-fast);
}

.lightbox-close-btn:hover {
  background: var(--accent-rose);
  border-color: var(--accent-rose);
}

.upload-dropzone {
  border: 2px dashed rgba(229, 184, 105, 0.35);
  background: rgba(229, 184, 105, 0.03);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--accent-gold);
  background: rgba(229, 184, 105, 0.08);
}

.offer-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.offer-thumb-item {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xs);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  transition: all var(--transition-fast);
}

.offer-thumb-item:hover {
  border-color: rgba(229, 184, 105, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.offer-thumb-item.is-cover-active {
  border: 1.5px solid var(--accent-gold);
  box-shadow: 0 0 14px rgba(229, 184, 105, 0.25);
}

.offer-thumb-preview {
  position: relative;
  width: 100%;
  height: 95px;
  background: #080a0f;
  overflow: hidden;
  cursor: pointer;
}

.offer-thumb-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.offer-thumb-preview:hover img {
  transform: scale(1.06);
}

.offer-thumb-cover-tag {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(229, 184, 105, 0.95);
  color: #0b0f19;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.offer-thumb-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px;
  background: var(--bg-card-muted);
  border-top: 1px solid var(--border-subtle);
  gap: 4px;
}

.btn-thumb-set-cover {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(229, 184, 105, 0.12);
  color: var(--accent-gold);
  border: 1px solid rgba(229, 184, 105, 0.35);
  cursor: pointer;
  flex: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all var(--transition-fast);
}

.btn-thumb-set-cover:hover {
  background: var(--accent-gold);
  color: #0b0f19;
}

.btn-thumb-set-cover.is-current {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.4);
  cursor: default;
}

.btn-thumb-del {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: rgba(225, 29, 72, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(225, 29, 72, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.btn-thumb-del:hover {
  background: var(--accent-rose);
  color: #ffffff;
  transform: scale(1.1);
}

/* ==========================================================================
   VIEW 3: INTEGRATED PROJECT WORKSPACE
   ========================================================================== */
.workspace-top-bar {
  min-height: 68px;
  height: auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-sidebar);
  flex-shrink: 0;
}

.workspace-top-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.workspace-top-meta .btn-icon-sm {
  flex-shrink: 0;
}

.workspace-top-info {
  min-width: 0;
  flex: 1;
}

.workspace-top-heading-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.workspace-top-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

.workspace-top-tagline {
  margin: 4px 0 0 0;
  font-size: 0.83rem;
  line-height: 1.45;
  color: var(--text-secondary);
  word-break: break-word;
}

.workspace-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.workspace-body-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  height: auto;
  overflow: hidden;
}

/* Middle Content Pane: Markdown Viewer / Editor */
.workspace-content-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-app);
}

.workspace-toolbar {
  height: 44px;
  min-height: 44px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

.file-name-badge {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.workspace-preview-area {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px 28px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-app);
}

/* Confluence Document Headings */
.workspace-preview-area h1 {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.workspace-preview-area h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  margin-top: 28px;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.workspace-preview-area h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 20px;
  margin-bottom: 8px;
}

.workspace-preview-area p {
  margin-bottom: 14px;
  color: var(--text-secondary);
}

/* Confluence Style Panels / Callouts */
.confluence-panel,
.callout-panel {
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 16px 0;
  border-left: 4px solid var(--border-subtle);
  background: var(--bg-card-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.confluence-panel-info,
.callout-info {
  border-left: 4px solid var(--accent-primary);
  background: var(--accent-primary-subtle);
  color: var(--text-primary);
}

.confluence-panel-note,
.callout-success {
  border-left: 4px solid var(--accent-emerald);
  background: var(--accent-emerald-subtle);
  color: var(--text-primary);
}

.confluence-panel-warning,
.callout-warning {
  border-left: 4px solid var(--accent-amber);
  background: var(--accent-amber-subtle);
  color: var(--text-primary);
}

.confluence-panel-error,
.callout-danger {
  border-left: 4px solid var(--accent-rose);
  background: var(--accent-rose-subtle);
  color: var(--text-primary);
}

/* Jira Lozenges (Status Badges) */
.jira-lozenge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.70rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 3px;
  line-height: 14px;
  white-space: nowrap;
}

.jira-lozenge-default {
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.jira-lozenge-inprogress {
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
  border: 1px solid rgba(12, 102, 228, 0.25);
}

.jira-lozenge-success {
  background: var(--accent-emerald-subtle);
  color: var(--accent-emerald);
  border: 1px solid rgba(0, 135, 90, 0.25);
}

.jira-lozenge-warning {
  background: var(--accent-amber-subtle);
  color: var(--accent-amber);
  border: 1px solid rgba(255, 139, 0, 0.25);
}

/* Confluence Clean Table Styling */
.workspace-preview-area table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 0.86rem;
}

.workspace-preview-area th {
  background: var(--bg-card-muted);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 12px;
  border: 1px solid var(--border-subtle);
  text-align: left;
}

.workspace-preview-area td {
  padding: 8px 12px;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.workspace-preview-area tr:hover td {
  background: var(--jira-hover);
}

.workspace-edit-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px;
}

.workspace-code-textarea {
  flex: 1;
  width: 100%;
  height: 100%;
  padding: 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  resize: none;
  outline: none;
}

.workspace-code-textarea:focus {
  border-color: var(--border-focus);
}

/* Right Copilot Studio Pane */
.workspace-copilot-pane {
  width: 380px;
  min-width: 380px;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border-subtle);
  background: var(--bg-sidebar);
  height: 100%;
  transition: width var(--transition-normal), min-width var(--transition-normal), max-width var(--transition-normal);
}

.workspace-copilot-pane.collapsed {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  border-left: none !important;
  overflow: hidden !important;
  display: none !important;
}

.copilot-close-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
  margin-left: 4px;
}

.copilot-close-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-copilot-toggle.active {
  background: var(--accent-emerald-subtle);
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.4);
}

.copilot-header {
  height: 44px;
  min-height: 44px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

.copilot-context-bar {
  padding: 8px 14px;
  background: var(--bg-card-muted);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.76rem;
  color: var(--text-muted);
}

.copilot-context-bar strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.copilot-prompt-chips {
  padding: 10px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.copilot-chip-btn {
  padding: 4px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.copilot-chip-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card);
  color: var(--text-primary);
}

.copilot-chat-box {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.copilot-msg {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
  line-height: 1.55;
}

.copilot-msg-assistant {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.copilot-msg-user {
  background: var(--accent-emerald-subtle);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--text-primary);
  align-self: flex-end;
}

.copilot-input-form {
  padding: 12px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-card);
}

.copilot-input-textarea {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-size: 0.82rem;
  resize: none;
  outline: none;
}

.copilot-input-textarea:focus {
  border-color: var(--border-focus);
}

.copilot-input-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* In-place Editable Elements & Comments */
.wipa-editable {
  position: relative;
  cursor: pointer;
  border-radius: 4px;
  transition: background var(--transition-fast);
}

.wipa-editable:hover {
  background: var(--accent-emerald-subtle);
  outline: 1px dashed var(--accent-emerald);
}

.wipa-inline-editing {
  background: var(--bg-input, #1e293b) !important;
  color: var(--text-primary, #f8fafc) !important;
  border: 1px solid var(--accent-emerald, #10b981) !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25) !important;
  padding: 2px 6px;
  border-radius: var(--radius-xs, 4px);
  outline: none !important;
  cursor: text !important;
  min-width: 1ch;
  user-select: text;
}

/* =============================================================================
   DEV ANCHOR & LOCK SYSTEM (NỘI DUNG NEO CHUẨN ĐƯỢC DEV CHỐT)
   ============================================================================= */

.wipa-dev-anchor {
  position: relative;
}

/* DEV MODE: Indicator nhỏ gọn 2x2 px ở góc trên bên phải của block */
body.mode-dev .wipa-dev-anchor::before {
  content: '';
  position: absolute;
  top: 1px;
  right: 1px;
  width: 2px;
  height: 2px;
  background-color: var(--accent-cyan);
  border-radius: 50%;
  opacity: 0.8;
  pointer-events: none;
  z-index: 10;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

body.mode-dev .wipa-dev-anchor:hover::before {
  opacity: 1;
  transform: scale(2);
  box-shadow: 0 0 4px var(--accent-cyan);
}

/* Floating Actions Bar (Góp ý AI + Khóa/Mở Neo) */
.wipa-floating-actions-bar {
  position: absolute;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

.wipa-float-action-btn {
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
}

.wipa-float-action-btn.btn-comment {
  background: var(--accent-emerald);
  color: #ffffff;
}
.wipa-float-action-btn.btn-comment:hover {
  filter: brightness(1.1);
}

.wipa-float-action-btn.btn-anchor-lock {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.4);
}
.wipa-float-action-btn.btn-anchor-lock:hover {
  background: rgba(6, 182, 212, 0.25);
}

.wipa-float-action-btn.btn-anchor-unlock {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.4);
}
.wipa-float-action-btn.btn-anchor-unlock:hover {
  background: rgba(244, 63, 94, 0.25);
}

/* Status badge đếm số lượng Anchor */
.dev-anchors-counter-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.25);
}

/* PROD MODE: Ẩn hoàn toàn toàn bộ indicator và thanh thao tác dev */

body.mode-prod .wipa-dev-anchor::before {
  display: none !important;
}

body.mode-prod .wipa-floating-actions-bar,
body.mode-prod .dev-anchors-counter-badge {
  display: none !important;
}

.wipa-floating-comment-btn {
  position: absolute;
  z-index: 50;
  padding: 4px 10px;
  background: var(--accent-emerald);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

.wipa-comment-popup {
  position: fixed;
  z-index: 200;
  width: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.comment-popup-header {
  padding: 10px 14px;
  background: var(--bg-card-muted);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
}

.comment-popup-close {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-muted);
}

.comment-popup-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-quote-box {
  padding: 6px 10px;
  background: var(--bg-card-muted);
  border-left: 2px solid var(--accent-emerald);
  font-size: 0.76rem;
  color: var(--text-muted);
  max-height: 60px;
  overflow: hidden;
}

.comment-textarea {
  width: 100%;
  padding: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xs);
  font-size: 0.8rem;
  color: var(--text-primary);
  resize: none;
  outline: none;
}

.comment-popup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ==========================================================================
   VIEW 4: KNOWLEDGE EXPLORER
   ========================================================================== */
.explorer-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.search-bar-wrap {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 10px 14px 10px 42px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: all var(--transition-fast);
}

.search-input:focus {
  border-color: var(--border-focus);
}

.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.knowledge-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--transition-fast);
}

.knowledge-card:hover {
  border-color: var(--border-card);
  box-shadow: var(--shadow-sm);
}

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

.card-module-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  background: var(--accent-emerald-subtle);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
}

.card-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
}

.card-summary {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.card-tag {
  font-size: 0.7rem;
  padding: 2px 6px;
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
}

.card-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* ==========================================================================
   VIEW 5: AI LAB
   ========================================================================== */
.ai-lab-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.ai-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ai-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.ai-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.prompt-textarea {
  width: 100%;
  height: 120px;
  padding: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.88rem;
  resize: none;
  outline: none;
}

.prompt-textarea:focus {
  border-color: var(--border-focus);
}

.sample-prompts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sample-prompt-btn {
  text-align: left;
  padding: 8px 12px;
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sample-prompt-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card);
  color: var(--text-primary);
}

.ai-result-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.context-output-box {
  flex: 1;
  min-height: 240px;
  max-height: 480px;
  overflow-y: auto;
  padding: 14px;
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ==========================================================================
   VIEW 6 & 7: MCP & GUIDES
   ========================================================================== */
.guide-container {
  display: flex;
  gap: 24px;
}

.guide-sidebar {
  width: 260px;
  min-width: 260px;
}

.guide-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.guide-nav-item {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.guide-nav-item:hover {
  background: var(--bg-card-muted);
  color: var(--text-primary);
}

.guide-nav-item.active {
  background: var(--accent-emerald-subtle);
  border-color: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
  font-weight: 600;
}

.guide-content-area {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.guide-article-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guide-article-section h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.guide-article-section h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 8px;
}

.guide-article-section p, .guide-article-section li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.guide-callout {
  padding: 12px 16px;
  background: var(--bg-card-muted);
  border-left: 3px solid var(--accent-emerald);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* Code Snippet Box */
.code-snippet-wrap {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.code-snippet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: var(--bg-card-muted);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.code-block {
  padding: 14px;
  background: var(--bg-code);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.55;
  overflow-x: auto;
}

.copy-btn {
  padding: 2px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-size: 0.72rem;
  cursor: pointer;
}

.copy-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

/* Data Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.data-table th, .data-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table th {
  background: var(--bg-card-muted);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table tr:hover td {
  background: var(--bg-card-muted);
}

/* ==========================================================================
   MODALS & DIALOGS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

[data-theme="light"] .modal-overlay {
  background: rgba(15, 23, 42, 0.45);
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.15s ease-out;
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.modal-dialog.modal-lg {
  max-width: 780px;
}

.modal-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.modal-title-group h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 22px;
}

/* Modal Form Styles */
.intake-tabs-wrap {
  display: flex;
  gap: 6px;
  background: var(--bg-card-muted);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.intake-tab-btn {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.intake-tab-btn:hover {
  color: var(--text-primary);
}

.intake-tab-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.intake-form-pane {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.intake-form-pane.active {
  display: flex;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-label .required {
  color: var(--accent-rose);
}

.form-input, .form-textarea {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--border-focus);
}

.form-textarea {
  resize: vertical;
}

.gw-preset-pills {
  display: flex;
  gap: 4px;
}

.preset-pill-btn {
  padding: 2px 7px;
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  font-size: 0.72rem;
  color: var(--text-muted);
  cursor: pointer;
}

.preset-pill-btn:hover {
  border-color: var(--border-card);
  color: var(--text-primary);
}

/* Gen Loading Spinner */
.gen-loading-box {
  padding: 40px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gen-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-emerald);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-sm {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-subtle);
  border-top-color: var(--accent-emerald);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Toast Notifications - Flat Pro */
.wipa-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.wipa-toast {
  pointer-events: auto;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.84rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.wipa-toast.success {
  border-left: 3px solid var(--accent-emerald);
}

.wipa-toast.error {
  border-left: 3px solid var(--accent-rose);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   RESPONSIVE DESIGN BREAKPOINTS
   ========================================================================== */
@media (max-width: 1120px) {
  .ai-lab-layout {
    grid-template-columns: 1fr;
  }
  .workspace-copilot-pane {
    width: 320px;
    min-width: 320px;
  }
  /* Responsive: xếp dọc các button cạnh title + desc của dự án để giải phóng không gian */
  .workspace-top-bar {
    align-items: flex-start !important;
  }
  .workspace-top-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
  }
  .workspace-top-actions .btn-secondary {
    width: 100% !important;
    white-space: nowrap !important;
    justify-content: flex-start !important;
  }
}

@media (max-width: 860px) {
  /* Ẩn label nút khi thiếu chỗ, chỉ giữ icon */
  .theme-segment-btn span {
    display: none !important;
  }
  .theme-segment-btn {
    padding: 4px 6px !important;
  }
  .topbar-link-btn span {
    display: none !important;
  }
  .topbar-link-btn {
    padding: 4px 6px !important;
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex !important;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px !important;
    min-width: 280px !important;
    max-width: 85vw !important;
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .app-sidebar.mobile-open {
    transform: translateX(0);
  }

  /* Reset collapsed hidden text on mobile drawer so all labels are readable */
  .app-sidebar.mobile-open .brand-text-wrap,
  .app-sidebar.mobile-open .cta-label,
  .app-sidebar.mobile-open .sidebar-group-title,
  .app-sidebar.mobile-open .sidebar-group-header,
  .app-sidebar.mobile-open .nav-text,
  .app-sidebar.mobile-open .nav-pill,
  .app-sidebar.mobile-open .sidebar-project-name,
  .app-sidebar.mobile-open .sidebar-project-count,
  .app-sidebar.mobile-open .sidebar-project-chevron,
  .app-sidebar.mobile-open .sidebar-project-items,
  .app-sidebar.mobile-open .status-label,
  .app-sidebar.mobile-open .footer-action-btn span {
    display: flex !important;
  }
  .app-sidebar.mobile-open .nav-text,
  .app-sidebar.mobile-open .sidebar-group-title {
    display: block !important;
  }
  .app-sidebar.mobile-open .sidebar-header {
    padding: 0 16px !important;
    justify-content: space-between !important;
  }
  .app-sidebar.mobile-open .sidebar-collapse-toggle {
    display: flex !important;
  }

  .app-topbar {
    padding: 0 10px !important;
    height: 48px !important;
    min-height: 48px !important;
  }
  .topbar-breadcrumb {
    font-size: 0.8rem !important;
    max-width: 140px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Ẩn chữ của button khi thiếu chỗ trên mobile, chỉ còn icon */
  .workspace-top-actions .btn-secondary span {
    display: none !important;
  }
  .workspace-top-actions .btn-secondary {
    padding: 6px 8px !important;
    min-width: 32px !important;
    width: auto !important;
    justify-content: center !important;
  }
  .workspace-top-actions {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 4px !important;
    width: auto !important;
  }

  .workspace-toolbar .btn-secondary span {
    display: none !important;
  }
  .workspace-toolbar .btn-secondary {
    padding: 5px 8px !important;
    min-width: 30px !important;
    justify-content: center !important;
  }

  /* Padding tối thiểu trên mobile theo yêu cầu */
  .view-panel {
    padding: 6px 6px 20px !important;
  }

  .workspace-top-bar {
    padding: 6px 8px !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    min-height: auto !important;
    height: auto !important;
  }

  .workspace-top-meta {
    width: auto !important;
    flex: 1 !important;
    gap: 8px !important;
  }

  .workspace-top-title {
    font-size: 1.05rem !important;
  }

  .workspace-top-tagline {
    font-size: 0.78rem !important;
    line-height: 1.35 !important;
  }

  .workspace-body-layout {
    flex-direction: column;
    position: relative;
  }

  /* Mobile Copilot Drawer (Bottom Sheet) */
  .workspace-copilot-pane {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: 75vh !important;
    max-height: 520px !important;
    border-left: none !important;
    border-top: 1px solid var(--border-card) !important;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.35) !important;
    z-index: 150 !important;
    transform: translateY(0);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .workspace-copilot-pane.collapsed {
    transform: translateY(100%) !important;
    display: none !important;
  }

  /* Mobile Toolbar & Preview: Padding siêu tối thiểu */
  .workspace-toolbar {
    height: auto !important;
    min-height: 38px !important;
    padding: 4px 6px !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
  }

  .workspace-preview-area {
    padding: 6px 6px 16px !important;
  }

  .wipa-html-page {
    padding: 0 0 10px !important;
  }

  .wipa-page-hero {
    margin-bottom: 12px !important;
    padding-bottom: 10px !important;
  }
  .wipa-hero-badge {
    padding: 2px 8px !important;
    font-size: 0.68rem !important;
    margin-bottom: 6px !important;
  }
  .wipa-hero-title {
    font-size: 1.15rem !important;
    line-height: 1.3 !important;
    margin-bottom: 6px !important;
  }
  .wipa-hero-tagline {
    font-size: 0.82rem !important;
    line-height: 1.45 !important;
  }

  /* Metrics Strip: 2x2 grid */
  .wipa-metrics-strip {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
  }
  .metric-box {
    padding: 10px 8px !important;
  }
  .metric-val {
    font-size: 1.05rem !important;
  }
  .metric-lbl {
    font-size: 0.72rem !important;
  }

  /* Diagram Section */
  .wipa-diagram-section {
    margin-bottom: 18px !important;
  }
  .diagram-card-header {
    padding: 10px 12px !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .diagram-title {
    font-size: 0.76rem !important;
  }
  .svg-diagram-wrapper {
    padding: 10px 4px !important;
    min-height: 140px !important;
  }

  /* Accordion Card Summary Optimization (Solves vertical 1-word wrapping in Image 1!) */
  .wipa-card-summary {
    padding: 12px 14px 12px 12px !important;
    padding-right: 36px !important;
    flex-wrap: wrap !important;
    gap: 6px 10px !important;
    align-items: flex-start !important;
    position: relative !important;
  }
  .wipa-card-summary::after {
    position: absolute !important;
    right: 14px !important;
    top: 16px !important;
    margin-left: 0 !important;
  }
  .summary-left {
    flex: 1 1 100% !important;
    align-items: flex-start !important;
    gap: 10px !important;
    min-width: 0 !important;
  }
  .summary-icon {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    font-size: 1rem !important;
    margin-top: 2px !important;
  }
  .summary-title {
    font-size: 0.92rem !important;
    line-height: 1.4 !important;
    flex: 1 !important;
    min-width: 0 !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }
  .summary-badge {
    margin-left: 38px !important;
    margin-top: 2px !important;
    font-size: 0.7rem !important;
    padding: 2px 8px !important;
  }

  .wipa-card-content {
    padding: 14px 12px !important;
    font-size: 0.88rem !important;
  }

  /* Grids & Content */
  .content-grid-2,
  .content-grid-3,
  .content-grid-4 {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .sub-feature-box {
    padding: 12px 14px !important;
  }

  /* Clean Tables Mobile Scroll */
  .wipa-clean-table {
    display: block !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
  }
  .wipa-clean-table th,
  .wipa-clean-table td {
    padding: 8px 10px !important;
    font-size: 0.8rem !important;
  }

  /* Quotes & Code */
  .wipa-quote-card {
    padding: 12px 14px !important;
    font-size: 0.85rem !important;
  }
  .code-box {
    padding: 10px 12px !important;
    font-size: 0.78rem !important;
  }

  /* Mobile Tooltip */
  .wipa-tooltip-box {
    left: 0 !important;
    transform: translateY(4px) !important;
    max-width: calc(100vw - 32px) !important;
    min-width: 200px !important;
  }
  .wipa-tooltip-trigger:hover .wipa-tooltip-box,
  .wipa-tooltip-trigger:focus-within .wipa-tooltip-box {
    transform: translateY(0) !important;
  }

  .dashboard-pillars-grid {
    grid-template-columns: 1fr;
  }
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   WIPA PROJECT CONTENT PAGES & DOCUMENT VIEWER STYLES
   Full support for Dark (Obsidian) and Light (Crisp Slate) themes
   ========================================================================== */

.wipa-html-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px 36px;
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.68;
}

/* WIPA Standard Card Component */
.wipa-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.wipa-card:hover {
  border-color: rgba(212, 175, 55, 0.35);
  box-shadow: var(--shadow-md);
}

[data-theme="light"] .wipa-card {
  background: #ffffff;
  border-color: #E2E8F0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

/* WIPA Standard Responsive Grid System */
.wipa-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.wipa-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.wipa-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1024px) {
  .wipa-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .wipa-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .wipa-grid-4,
  .wipa-grid-3,
  .wipa-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   CỐ VẤN NHÂN SINH (CVNS) - NOBLE & SERENE DESIGN SYSTEM
   Warm Slate, Gold Wisdom, Serene Jade, High Readability
   ========================================================================== */
.cvns-container {
  max-width: 1140px;
  margin: 0 auto;
}

.cvns-lead-text {
  max-width: 820px;
  margin: 0 auto 20px;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.cvns-gold-card {
  background: linear-gradient(145deg, rgba(26, 32, 44, 0.85) 0%, rgba(15, 20, 30, 0.95) 100%);
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: all var(--transition-normal);
}

.cvns-gold-card:hover {
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.12);
}

.cvns-jade-card {
  background: linear-gradient(145deg, rgba(20, 35, 30, 0.8) 0%, rgba(14, 22, 25, 0.95) 100%);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: all var(--transition-normal);
}

.cvns-jade-card:hover {
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.12);
}

.cvns-badge-gold {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(212, 175, 55, 0.14);
  color: #E5B869;
  border: 1px solid rgba(212, 175, 55, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cvns-badge-jade {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.14);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cvns-btn-pill {
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 20px;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  background: var(--bg-card-muted, rgba(255, 255, 255, 0.04));
  color: var(--text-secondary, #CBD5E1);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cvns-btn-pill:hover {
  background: var(--bg-card-hover, rgba(255, 255, 255, 0.1));
  color: var(--text-primary, #FFFFFF);
  border-color: rgba(212, 175, 55, 0.4);
}

.cvns-btn-pill.active {
  background: rgba(212, 175, 55, 0.22);
  color: #FDE68A;
  border: 1.5px solid #D4AF37;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
}

/* Light Mode Overrides for CVNS Pills & Badges */
[data-theme="light"] .cvns-btn-pill {
  background: #F4F5F7;
  border: 1px solid #DFE1E6;
  color: #44546F;
}

[data-theme="light"] .cvns-btn-pill:hover {
  background: #EBECF0;
  color: #172B4D;
  border-color: #D97706;
}

[data-theme="light"] .cvns-btn-pill.active {
  background: #FEF3C7 !important;
  color: #78350F !important;
  border: 1.5px solid #D97706 !important;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(217, 119, 6, 0.18);
}

[data-theme="light"] .cvns-badge-gold {
  background: #FEF3C7 !important;
  color: #92400E !important;
  border: 1px solid #FCD34D !important;
}

[data-theme="light"] .cvns-badge-jade {
  background: #ECFDF5 !important;
  color: #065F46 !important;
  border: 1px solid #A7F3D0 !important;
}

[data-theme="light"] .cvns-gold-card {
  background: #FFFFFF !important;
  border: 1px solid #FCD34D !important;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.1) !important;
}

[data-theme="light"] .cvns-jade-card {
  background: #FFFFFF !important;
  border: 1px solid #A7F3D0 !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1) !important;
}

/* Light Theme Discipline Selector Tags */
.discipline-tag-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--bg-card-muted, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.2s ease;
}
.discipline-tag-label:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card);
}
[data-theme="light"] .discipline-tag-label {
  background: #F8FAFC;
  border-color: #DFE1E6;
}
[data-theme="light"] .discipline-tag-label:hover {
  background: #F1F5F9;
}

/* Light Mode Global Text Contrast Guardrails (Eliminating Invisible & Low Contrast Text) */
[data-theme="light"] [style*="color: #F8FAFC"], [data-theme="light"] [style*="color:#F8FAFC"],
[data-theme="light"] [style*="color: #f8fafc"], [data-theme="light"] [style*="color:#f8fafc"],
[data-theme="light"] [style*="color: #E2E8F0"], [data-theme="light"] [style*="color:#E2E8F0"],
[data-theme="light"] [style*="color: #e2e8f0"], [data-theme="light"] [style*="color:#e2e8f0"],
[data-theme="light"] [style*="color: #CBD5E1"], [data-theme="light"] [style*="color:#CBD5E1"],
[data-theme="light"] [style*="color: #cbd5e1"], [data-theme="light"] [style*="color:#cbd5e1"],
[data-theme="light"] [style*="color: #FFFFFF"], [data-theme="light"] [style*="color:#FFFFFF"],
[data-theme="light"] [style*="color: #ffffff"], [data-theme="light"] [style*="color:#ffffff"],
[data-theme="light"] [style*="color: #FFF"], [data-theme="light"] [style*="color:#FFF"],
[data-theme="light"] [style*="color: #fff"], [data-theme="light"] [style*="color:#fff"] {
  color: var(--text-primary) !important;
}

[data-theme="light"] [style*="color: #94A3B8"], [data-theme="light"] [style*="color:#94A3B8"],
[data-theme="light"] [style*="color: #94a3b8"], [data-theme="light"] [style*="color:#94a3b8"],
[data-theme="light"] [style*="color: #9FADBC"], [data-theme="light"] [style*="color:#9FADBC"],
[data-theme="light"] [style*="color: #9fadbc"], [data-theme="light"] [style*="color:#9fadbc"] {
  color: var(--text-secondary) !important;
}

[data-theme="light"] [style*="color: #E5B869"], [data-theme="light"] [style*="color:#E5B869"],
[data-theme="light"] [style*="color: #e5b869"], [data-theme="light"] [style*="color:#e5b869"],
[data-theme="light"] [style*="color: #D4AF37"], [data-theme="light"] [style*="color:#D4AF37"],
[data-theme="light"] [style*="color: #d4af37"], [data-theme="light"] [style*="color:#d4af37"],
[data-theme="light"] [style*="color: #FBBF24"], [data-theme="light"] [style*="color:#FBBF24"],
[data-theme="light"] [style*="color: #fbbf24"], [data-theme="light"] [style*="color:#fbbf24"] {
  color: #B45309 !important;
}

[data-theme="light"] [style*="color: #38BDF8"], [data-theme="light"] [style*="color:#38BDF8"],
[data-theme="light"] [style*="color: #38bdf8"], [data-theme="light"] [style*="color:#38bdf8"],
[data-theme="light"] [style*="color: #06B6D4"], [data-theme="light"] [style*="color:#06B6D4"],
[data-theme="light"] [style*="color: #06b6d4"], [data-theme="light"] [style*="color:#06b6d4"],
[data-theme="light"] [style*="color: #60A5FA"], [data-theme="light"] [style*="color:#60A5FA"],
[data-theme="light"] [style*="color: #60a5fa"], [data-theme="light"] [style*="color:#60a5fa"],
[data-theme="light"] [style*="color: #3B82F6"], [data-theme="light"] [style*="color:#3B82F6"],
[data-theme="light"] [style*="color: #3b82f6"], [data-theme="light"] [style*="color:#3b82f6"] {
  color: #0369A1 !important;
}

[data-theme="light"] [style*="color: #10B981"], [data-theme="light"] [style*="color:#10B981"],
[data-theme="light"] [style*="color: #10b981"], [data-theme="light"] [style*="color:#10b981"],
[data-theme="light"] [style*="color: #34D399"], [data-theme="light"] [style*="color:#34D399"],
[data-theme="light"] [style*="color: #34d399"], [data-theme="light"] [style*="color:#34d399"] {
  color: #047857 !important;
}

[data-theme="light"] [style*="color: #F59E0B"], [data-theme="light"] [style*="color:#F59E0B"],
[data-theme="light"] [style*="color: #f59e0b"], [data-theme="light"] [style*="color:#f59e0b"] {
  color: #B45309 !important;
}

[data-theme="light"] [style*="color: #EC4899"], [data-theme="light"] [style*="color:#EC4899"],
[data-theme="light"] [style*="color: #ec4899"], [data-theme="light"] [style*="color:#ec4899"] {
  color: #BE185D !important;
}

[data-theme="light"] [style*="color: #A855F7"], [data-theme="light"] [style*="color:#A855F7"],
[data-theme="light"] [style*="color: #a855f7"], [data-theme="light"] [style*="color:#a855f7"],
[data-theme="light"] [style*="color: #7C3AED"], [data-theme="light"] [style*="color:#7C3AED"],
[data-theme="light"] [style*="color: #7c3aed"], [data-theme="light"] [style*="color:#7c3aed"] {
  color: #6D28D9 !important;
}

[data-theme="light"] [style*="color: #EF4444"], [data-theme="light"] [style*="color:#EF4444"],
[data-theme="light"] [style*="color: #ef4444"], [data-theme="light"] [style*="color:#ef4444"] {
  color: #B91C1C !important;
}

[data-theme="light"] .wipa-card[style*="rgba(15, 23, 42"],
[data-theme="light"] .wipa-card[style*="rgba(15,23,42"] {
  background: #FFFFFF !important;
  border-color: #DFE1E6 !important;
}

.cvns-card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 960px) {
  .cvns-card-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Top Hero Header */
.wipa-page-hero {
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.wipa-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
  background: var(--accent-emerald-subtle);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

[data-theme="light"] .wipa-hero-badge {
  background: rgba(5, 150, 105, 0.08);
  color: #047857;
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  display: inline-block;
}

.wipa-hero-title {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.28;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.wipa-hero-tagline {
  font-size: 1.02rem;
  color: var(--text-secondary);
  line-height: 1.68;
  max-width: 100%;
}

/* ==========================================================================
   TOOLTIPS (FIXED: Hover/focus only, clean popup with shadow, zero inline spill)
   ========================================================================== */
.wipa-tooltip-trigger {
  position: relative;
  display: inline;
  cursor: help;
  border-bottom: 1.5px dotted var(--accent-cyan);
  color: var(--accent-cyan);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.wipa-tooltip-trigger:hover,
.wipa-tooltip-trigger:focus {
  color: var(--border-focus);
  border-bottom-color: var(--border-focus);
}

.wipa-tooltip-box {
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: 340px;
  min-width: 220px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  line-height: 1.52;
  font-weight: normal;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.2s;
  white-space: normal;
  text-align: left;
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid #334155;
}

.wipa-tooltip-box strong {
  display: block;
  margin-bottom: 3px;
  color: #38bdf8;
  font-weight: 600;
}

.wipa-tooltip-box::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -6px;
  border-width: 6px;
  border-style: solid;
  border-color: #1e293b transparent transparent transparent;
}

[data-theme="light"] .wipa-tooltip-box {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .wipa-tooltip-box strong {
  color: #0284c7;
}

[data-theme="light"] .wipa-tooltip-box::after {
  border-color: #ffffff transparent transparent transparent;
}

.wipa-tooltip-trigger:hover .wipa-tooltip-box,
.wipa-tooltip-trigger:focus-within .wipa-tooltip-box {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   METRICS STRIP
   ========================================================================== */
.wipa-metrics-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.metric-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.metric-box:hover {
  border-color: var(--border-card);
  box-shadow: var(--shadow-md);
}

.metric-val {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 6px;
}

.metric-lbl {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.text-emerald { color: var(--accent-emerald) !important; }
.text-cyan { color: var(--accent-cyan) !important; }
.text-amber { color: var(--accent-amber) !important; }
.text-rose { color: var(--accent-rose) !important; }
.text-indigo { color: var(--accent-indigo) !important; }
.text-gold { color: var(--accent-gold) !important; }
.text-sky { color: var(--accent-sky) !important; }
.text-purple { color: var(--accent-purple) !important; }
.text-pink { color: var(--accent-pink) !important; }
.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }

/* Global Semantic Badges */
.badge-gold {
  background: var(--accent-gold-subtle) !important;
  color: var(--accent-gold) !important;
  border: 1px solid var(--accent-gold) !important;
}
.badge-emerald {
  background: var(--accent-emerald-subtle) !important;
  color: var(--accent-emerald) !important;
  border: 1px solid var(--accent-emerald) !important;
}
.badge-cyan {
  background: var(--accent-cyan-subtle) !important;
  color: var(--accent-cyan) !important;
  border: 1px solid var(--accent-cyan) !important;
}
.badge-amber {
  background: var(--accent-amber-subtle) !important;
  color: var(--accent-amber) !important;
  border: 1px solid var(--accent-amber) !important;
}
.badge-indigo {
  background: var(--accent-indigo-subtle) !important;
  color: var(--accent-indigo) !important;
  border: 1px solid var(--accent-indigo) !important;
}
.badge-sky {
  background: var(--accent-sky-subtle) !important;
  color: var(--accent-sky) !important;
  border: 1px solid var(--accent-sky) !important;
}
.badge-rose {
  background: var(--accent-rose-subtle) !important;
  color: var(--accent-rose) !important;
  border: 1px solid var(--accent-rose) !important;
}
.badge-purple {
  background: var(--accent-purple-subtle) !important;
  color: var(--accent-purple) !important;
  border: 1px solid var(--accent-purple) !important;
}
.badge-pink {
  background: var(--accent-pink-subtle) !important;
  color: var(--accent-pink) !important;
  border: 1px solid var(--accent-pink) !important;
}

/* Auth / Public visibility control */
body[data-logged-in="false"] .auth-only,
body:not([data-logged-in="true"]) .auth-only {
  display: none !important;
}

/* ==========================================================================
   DIAGRAM SECTION & SVG SCHEMAS (Auto Dark/Light Adaptation)
   ========================================================================== */
.wipa-diagram-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast);
}

.diagram-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-card-muted);
}

.diagram-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.84rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.diagram-badge {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--accent-emerald-subtle);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

[data-theme="light"] .diagram-badge {
  background: rgba(5, 150, 105, 0.08);
  color: #047857;
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.svg-diagram-wrapper {
  padding: 24px;
  overflow-x: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg-card);
  min-height: 220px;
}

.wipa-svg-diagram {
  width: 100%;
  max-width: 900px;
  height: auto;
  display: block;
  font-family: var(--font-body);
}

/* Dynamic SVG Styling for Light Theme */
[data-theme="light"] .wipa-svg-diagram text[fill="#FFFFFF"],
[data-theme="light"] .wipa-svg-diagram text[fill="#ffffff"] {
  fill: #0f172a !important;
}

[data-theme="light"] .wipa-svg-diagram text[fill="#E2E8F0"],
[data-theme="light"] .wipa-svg-diagram text[fill="#e2e8f0"] {
  fill: #1e293b !important;
}

[data-theme="light"] .wipa-svg-diagram text[fill="#94A3B8"],
[data-theme="light"] .wipa-svg-diagram text[fill="#94a3b8"] {
  fill: #475569 !important;
}

[data-theme="light"] .wipa-svg-diagram text[fill="#64748B"],
[data-theme="light"] .wipa-svg-diagram text[fill="#64748b"] {
  fill: #64748b !important;
}

[data-theme="light"] .wipa-svg-diagram text[fill="#34D399"],
[data-theme="light"] .wipa-svg-diagram text[fill="#34d399"],
[data-theme="light"] .wipa-svg-diagram text[fill="#10B981"] {
  fill: #047857 !important;
}

[data-theme="light"] .wipa-svg-diagram text[fill="#38BDF8"],
[data-theme="light"] .wipa-svg-diagram text[fill="#38bdf8"],
[data-theme="light"] .wipa-svg-diagram text[fill="#60A5FA"] {
  fill: #0369a1 !important;
}

[data-theme="light"] .wipa-svg-diagram text[fill="#FBBF24"],
[data-theme="light"] .wipa-svg-diagram text[fill="#fbbf24"],
[data-theme="light"] .wipa-svg-diagram text[fill="#F59E0B"] {
  fill: #b45309 !important;
}

[data-theme="light"] .wipa-svg-diagram text[fill="#F87171"],
[data-theme="light"] .wipa-svg-diagram text[fill="#f87171"],
[data-theme="light"] .wipa-svg-diagram text[fill="#EF4444"] {
  fill: #b91c1c !important;
}

[data-theme="light"] .wipa-svg-diagram text[fill="#C084FC"],
[data-theme="light"] .wipa-svg-diagram text[fill="#c084fc"],
[data-theme="light"] .wipa-svg-diagram text[fill="#8B5CF6"] {
  fill: #6d28d9 !important;
}

/* Light mode SVG rect backgrounds & containers */
[data-theme="light"] .wipa-svg-diagram rect[fill="#0F172A"],
[data-theme="light"] .wipa-svg-diagram rect[fill="#0f172a"],
[data-theme="light"] .wipa-svg-diagram rect[fill="#1E293B"],
[data-theme="light"] .wipa-svg-diagram rect[fill="#1e293b"],
[data-theme="light"] .wipa-svg-diagram rect[fill="#0B132B"],
[data-theme="light"] .wipa-svg-diagram rect[fill="#0b132b"],
[data-theme="light"] .wipa-svg-diagram rect[fill="#111C38"],
[data-theme="light"] .wipa-svg-diagram rect[fill="#111c38"],
[data-theme="light"] .wipa-svg-diagram rect[fill="#0B1C17"],
[data-theme="light"] .wipa-svg-diagram rect[fill="#0b1c17"],
[data-theme="light"] .wipa-svg-diagram rect[fill="#092530"],
[data-theme="light"] .wipa-svg-diagram rect[fill="#1E1438"],
[data-theme="light"] .wipa-svg-diagram rect[fill="#1e1438"],
[data-theme="light"] .wipa-svg-diagram rect[fill="#091E1B"],
[data-theme="light"] .wipa-svg-diagram rect[fill="#160B29"],
[data-theme="light"] .wipa-svg-diagram .svg-node-card {
  fill: #f8fafc !important;
  stroke: #cbd5e1 !important;
}

[data-theme="light"] .wipa-svg-diagram polygon[fill="rgba(15, 23, 42, 0.6)"] {
  fill: rgba(241, 245, 249, 0.85) !important;
}

[data-theme="light"] .wipa-svg-diagram path[stroke="#334155"],
[data-theme="light"] .wipa-svg-diagram path[stroke="#64748B"],
[data-theme="light"] .wipa-svg-diagram line[stroke="#334155"],
[data-theme="light"] .wipa-svg-diagram line[stroke="#1e293b"] {
  stroke: #cbd5e1 !important;
}

/* ==========================================================================
   WIPA CUSTOM INTERACTIVE HTML DIAGRAMS & FLOW PIPELINE
   ========================================================================== */
.wipa-interactive-diagram {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.diagram-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-pulse {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.badge-pulse::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  margin-right: 6px;
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

/* View Mode Switcher Toggle */
.diagram-view-toggle {
  display: inline-flex;
  background: var(--bg-body);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 2px;
  gap: 2px;
}

.diagram-toggle-btn {
  background: transparent;
  border: none;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.diagram-toggle-btn:hover {
  color: var(--text-primary);
}

.diagram-toggle-btn.active {
  background: var(--accent-emerald-subtle);
  color: var(--accent-emerald);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

[data-theme="light"] .diagram-toggle-btn.active {
  background: #ffffff;
  color: var(--accent-emerald-dark);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Interactive View Container */
.diagram-interactive-view {
  padding: 22px;
  background: var(--bg-card);
}

/* Flow Pipeline */
.diagram-flow-pipeline {
  display: flex;
  align-items: stretch;
  gap: 14px;
  width: 100%;
}

/* Stage Cards */
.diagram-stage-card {
  flex: 1;
  min-width: 0;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-normal);
  user-select: none;
}

.diagram-stage-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-card);
  box-shadow: var(--shadow-md);
}

.diagram-stage-card.active {
  box-shadow: var(--shadow-md);
  background: var(--bg-card-muted);
}

/* Stage Color Variants */
.diagram-stage-card.stage-pain {
  border-top: 4px solid var(--accent-rose);
}
.diagram-stage-card.stage-pain:hover,
.diagram-stage-card.stage-pain.active {
  border-color: var(--accent-rose);
  box-shadow: 0 0 0 1px var(--accent-rose), var(--shadow-md);
}

.diagram-stage-card.stage-solution {
  border-top: 4px solid var(--accent-emerald);
}
.diagram-stage-card.stage-solution:hover,
.diagram-stage-card.stage-solution.active {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 1px var(--accent-emerald), var(--shadow-md);
}

.diagram-stage-card.stage-outcome {
  border-top: 4px solid var(--accent-cyan);
}
.diagram-stage-card.stage-outcome:hover,
.diagram-stage-card.stage-outcome.active {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 1px var(--accent-cyan), var(--shadow-md);
}

.stage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.stage-step-pill {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

[data-theme="light"] .stage-step-pill {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-secondary);
}

.stage-badge-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.tag-pain {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
[data-theme="light"] .tag-pain {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.tag-solution {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
[data-theme="light"] .tag-solution {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.tag-outcome {
  background: rgba(6, 182, 212, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.3);
}
[data-theme="light"] .tag-outcome {
  background: rgba(6, 182, 212, 0.1);
  color: #0284c7;
}

.stage-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
  word-wrap: break-word;
}

.stage-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 14px;
  flex: 1;
  word-wrap: break-word;
}

.stage-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
  font-size: 0.75rem;
}

.stage-meta-tag {
  color: var(--text-muted);
  font-weight: 500;
}

.stage-action-hint {
  color: var(--accent-emerald);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  transition: transform var(--transition-fast);
}

.diagram-stage-card:hover .stage-action-hint {
  transform: translateX(3px);
}

/* Expandable content inside stage cards */
.stage-expandable-content {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-subtle);
}

.diagram-stage-card.active .stage-expandable-content {
  display: block;
}

.stage-details-box {
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

[data-theme="light"] .stage-details-box {
  background: rgba(0, 0, 0, 0.03);
}

/* Connector between stages */
.diagram-flow-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
  flex-shrink: 0;
}

.connector-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-emerald);
  font-size: 0.85rem;
  font-weight: bold;
  box-shadow: var(--shadow-sm);
}

.connector-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.5px;
}

/* Compact view container */
.diagram-compact-view {
  padding: 20px;
}

/* Responsive Layout */
@media (max-width: 860px) {
  .diagram-flow-pipeline {
    flex-direction: column;
    gap: 12px;
  }
  .diagram-flow-connector {
    flex-direction: row;
    gap: 8px;
    padding: 6px 0;
  }
  .connector-arrow {
    transform: rotate(90deg);
  }
  .diagram-header-actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }
}

/* ==========================================================================
   ACCORDIONS GROUP & CARDS
   ========================================================================== */
.wipa-accordions-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}

.wipa-accordion-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.wipa-accordion-card:hover {
  border-color: var(--border-card);
}

.wipa-accordion-card[open] {
  border-color: var(--border-card);
  box-shadow: var(--shadow-md);
}

.wipa-card-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  background: var(--bg-card);
  transition: background-color var(--transition-fast);
  position: relative;
}

.wipa-card-summary::-webkit-details-marker {
  display: none !important;
}

.wipa-card-summary:hover {
  background-color: var(--bg-card-hover);
}

/* Smooth custom Chevron indicator */
.wipa-card-summary::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(-45deg);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s;
  margin-left: 12px;
  flex-shrink: 0;
}

.wipa-accordion-card[open] > .wipa-card-summary::after {
  transform: rotate(45deg);
  border-color: var(--accent-emerald);
}

.summary-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.summary-icon {
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-card-muted);
  flex-shrink: 0;
}

.summary-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 0;
  overflow-wrap: break-word;
}

.summary-badge {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-card-muted);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
  margin-left: 8px;
}

.wipa-card-content {
  padding: 20px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.72;
}

.wipa-card-content p {
  margin-bottom: 12px;
}

.wipa-card-content p:last-child {
  margin-bottom: 0;
}

.wipa-card-content strong,
.wipa-card-content b {
  color: var(--text-primary);
  font-weight: 600;
}

.wipa-card-content ul,
.wipa-card-content ol {
  padding-left: 20px;
  margin-bottom: 12px;
}

.wipa-card-content li {
  margin-bottom: 6px;
}

/* ==========================================================================
   CONTENT GRIDS & SUB-FEATURE BOXES
   ========================================================================== */
.content-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.content-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.content-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.sub-feature-box {
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: border-color var(--transition-fast);
}

.sub-feature-box:hover {
  border-color: var(--border-card);
}

.sub-feature-box h4 {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sub-feature-box p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.62;
  margin-bottom: 8px;
}

.sub-feature-box ul {
  padding-left: 18px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.sub-feature-box li {
  margin-bottom: 6px;
}

/* Quote Cards (Voice of Customer) */
.wipa-quote-card {
  background: var(--bg-card-muted);
  border-left: 3px solid var(--accent-emerald);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  font-style: italic;
  color: var(--text-primary);
  margin: 10px 0;
  font-size: 0.92rem;
  line-height: 1.64;
  box-shadow: var(--shadow-sm);
}

.wipa-quote-card cite {
  display: block;
  font-size: 0.8rem;
  font-style: normal;
  color: var(--text-muted);
  margin-top: 8px;
  font-weight: 500;
}

/* Code Boxes & Technical Appendix */
.code-box {
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-emerald);
  overflow-x: auto;
  line-height: 1.5;
}

.dev-note-box {
  background: var(--bg-card-muted);
  border: 1px dashed var(--border-card);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.dev-note-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  margin-bottom: 6px;
}

/* ==========================================================================
   INTERACTIVE ARCHITECTURE BLOCKS & FLOW ELEMENTS (WIPA CORE vs SUB-PROJECTS)
   ========================================================================== */
.arch-interactive-canvas {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.arch-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.arch-filter-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.arch-tab-btn {
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.arch-tab-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-focus);
}

.arch-tab-btn.active {
  background: var(--accent-emerald-subtle);
  color: var(--accent-emerald);
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 1px var(--accent-emerald);
}

/* Tier 1: Core Platform Box */
.arch-core-container {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.05), rgba(16, 185, 129, 0.05));
  border: 1.5px solid rgba(6, 182, 212, 0.35);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
  position: relative;
  transition: all var(--transition-normal);
}

.arch-core-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.arch-core-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.arch-core-tag {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* 2 Pillars Grid */
.arch-pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.arch-pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.arch-pillar-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.arch-pillar-card.personal {
  border-top: 3px solid #0284c7;
}

.arch-pillar-card.organization {
  border-top: 3px solid #10b981;
}

.arch-pillar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.arch-pillar-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.arch-pillar-card.personal .arch-pillar-icon {
  background: rgba(2, 132, 199, 0.15);
  color: #38bdf8;
}

.arch-pillar-card.organization .arch-pillar-icon {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.arch-pillar-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.arch-pillar-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.arch-pillar-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.arch-pillar-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.arch-pillar-list li svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--accent-emerald);
}

/* Inheritance Connector Bridge */
.arch-bridge-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 12px 0 16px 0;
  text-align: center;
  position: relative;
}

.arch-bridge-pill {
  background: var(--bg-card-muted);
  border: 1px dashed var(--accent-emerald);
  border-radius: var(--radius-full);
  padding: 6px 18px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-emerald);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  z-index: 2;
}

/* Tier 2: Sub-Projects Ecosystem */
.arch-subprojects-container {
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: all var(--transition-normal);
}

.arch-subprojects-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.arch-subprojects-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
}

.arch-subprojects-tag {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.arch-subprojects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.arch-subproject-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all var(--transition-fast);
  cursor: pointer;
  position: relative;
}

.arch-subproject-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-emerald);
  box-shadow: var(--shadow-md);
}

.arch-subproject-icon-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.arch-subproject-icon {
  font-size: 1.4rem;
}

.arch-subproject-badge {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  background: var(--bg-card-muted);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.arch-subproject-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
}

.arch-subproject-target {
  font-size: 0.75rem;
  color: var(--accent-emerald);
  font-weight: 600;
}

.arch-subproject-desc {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.45;
  flex: 1;
}

.arch-subproject-inherited {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg-card-muted);
  padding: 4px 6px;
  border-radius: 4px;
  margin-top: 4px;
  border: 1px dashed var(--border-subtle);
}

/* Mobile Responsiveness for Architecture Component */
@media (max-width: 900px) {
  .arch-subprojects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .arch-pillars-grid {
    grid-template-columns: 1fr;
  }
  .arch-subprojects-grid {
    grid-template-columns: 1fr;
  }
  .arch-controls-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .arch-interactive-canvas {
    padding: 12px;
  }
}
/* ==========================================================================
   WIPA INTERACTIVE DIAGRAMS & 2-COLUMN SPLIT LAYOUT ARCHITECTURE
   ========================================================================== */

/* --- 1. Grid & Split Column Architecture --- */
.wipa-split-layout-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  margin: 16px 0 24px 0;
}

.wipa-split-layout-3col {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
  align-items: start;
  margin: 16px 0 24px 0;
}

.wipa-col-diagram {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.wipa-col-content {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

/* Header strip for split widgets */
.split-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4px;
}

.split-widget-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-heading);
}

.split-widget-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
  border: 1px solid rgba(87, 157, 255, 0.25);
}

/* --- 2. Interactive 7-Tier Absorption Pyramid --- */
.pyramid-stepper-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.pyramid-tier-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  position: relative;
}

.pyramid-tier-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card);
  color: var(--text-primary);
  transform: translateX(4px);
}

.pyramid-tier-btn.active {
  background: var(--jira-active-bg);
  border-color: var(--accent-primary);
  color: var(--text-primary);
  box-shadow: inset 3px 0 0 var(--accent-primary);
}

.pyramid-tier-btn.active .pyramid-tier-rank {
  background: var(--accent-primary);
  color: #FFFFFF;
}

.pyramid-tier-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pyramid-tier-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-xs);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.pyramid-tier-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.pyramid-tier-level {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

/* Pyramid Content Inspector Card */
.pyramid-inspector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pyramid-inspector-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.pyramid-inspector-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.pyramid-principles-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pyramid-principle-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-card-muted);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-primary);
  border-left: 3px solid var(--accent-emerald);
}

/* --- 3. Live Value Formula Simulator (Hormozi & Kelly) --- */
.simulator-gauge-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 0;
  background: var(--bg-code);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.simulator-score-display {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--accent-emerald);
  line-height: 1;
}

.simulator-score-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.simulator-sliders-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
}

.slider-label {
  font-weight: 600;
  color: var(--text-secondary);
}

.slider-value-pill {
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  background: var(--bg-card-muted);
}

.hormozi-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border-subtle);
  outline: none;
  cursor: pointer;
}

.hormozi-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 2px solid var(--bg-card);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

.hormozi-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.hormozi-slider.accent-cyan::-webkit-slider-thumb { background: var(--accent-cyan); }
.hormozi-slider.accent-emerald::-webkit-slider-thumb { background: var(--accent-emerald); }
.hormozi-slider.accent-amber::-webkit-slider-thumb { background: var(--accent-amber); }
.hormozi-slider.accent-rose::-webkit-slider-thumb { background: var(--accent-rose); }

/* Kelly Formula Bar */
.kelly-meter-box {
  padding: 12px;
  background: var(--bg-card-muted);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kelly-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.kelly-progress-track {
  height: 8px;
  background: var(--bg-card);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.kelly-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-emerald));
  transition: width 0.3s ease;
}

/* Strategic Verdict on Right */
.strategic-verdict-card {
  padding: 16px;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--accent-emerald);
  background: var(--bg-card-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.verdict-tier-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-emerald);
  letter-spacing: 0.5px;
}

.verdict-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.verdict-desc {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.verdict-tips-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  list-style: none;
  padding: 0;
}

.verdict-tip-item {
  font-size: 0.8rem;
  color: var(--text-primary);
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

/* --- 4. Interactive FastMCP Tool Console --- */
.mcp-tool-matrix {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mcp-category-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mcp-category-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-left: 2px;
}

.mcp-tool-cards-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mcp-tool-card-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-primary);
  text-align: left;
}

.mcp-tool-card-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card);
  transform: translateX(3px);
}

.mcp-tool-card-btn.active {
  background: var(--jira-active-bg);
  border-color: var(--accent-primary);
  box-shadow: inset 3px 0 0 var(--accent-primary);
}

.mcp-tool-name {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
}

.mcp-tool-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

/* Tool Inspector Panel */
.mcp-inspector-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mcp-inspector-codebox {
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-primary);
  overflow-x: auto;
  line-height: 1.45;
  position: relative;
}

/* --- 5. Interactive 9-Layer Pain Iceberg (03_icp_insight) --- */
.iceberg-visual-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.iceberg-depth-zone {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-subtle);
}

.iceberg-depth-zone.zone-surface {
  background: rgba(56, 189, 248, 0.05);
  border-color: rgba(56, 189, 248, 0.25);
}

.iceberg-depth-zone.zone-emotional {
  background: rgba(251, 191, 36, 0.05);
  border-color: rgba(251, 191, 36, 0.25);
}

.iceberg-depth-zone.zone-root {
  background: rgba(248, 113, 113, 0.05);
  border-color: rgba(248, 113, 113, 0.25);
}

.depth-zone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.pain-items-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pain-node-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-align: left;
}

.pain-node-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-card);
  transform: translateX(3px);
}

.pain-node-btn.active {
  border-color: var(--accent-rose);
  color: var(--text-primary);
  background: var(--jira-active-bg);
  box-shadow: inset 3px 0 0 var(--accent-rose);
}

.pain-node-index {
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-rose);
}

/* Pain Inspector on Right */
.pain-inspector-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pain-inspector-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-rose);
  text-transform: uppercase;
}

.pain-inspector-quote {
  font-style: italic;
  padding: 12px 14px;
  background: var(--bg-card-muted);
  border-left: 3px solid var(--accent-amber);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.45;
}

/* --- 6. Interactive Value Stack (04_grand_slam_offer) --- */
.value-stack-visual {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.value-stack-item-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}

.value-stack-item-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.value-stack-item-btn.active {
  border-color: var(--accent-emerald);
  background: var(--jira-active-bg);
  box-shadow: inset 3px 0 0 var(--accent-emerald);
}

.value-stack-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.value-stack-icon {
  font-size: 1.1rem;
}

.value-stack-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.value-stack-strikethrough {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.value-stack-free-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: var(--accent-emerald-subtle);
  color: var(--accent-emerald);
  border: 1px solid rgba(54, 179, 126, 0.3);
}

.value-stack-total-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-code);
  border: 1px dashed var(--accent-emerald);
  border-radius: var(--radius-sm);
  margin-top: 8px;
}

.value-stack-total-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.value-stack-total-nums {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-emerald);
}

/* --- 7. Interactive 4-Tier Value Ladder (05_he_sinh_thai_sp) --- */
.value-ladder-stepper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.ladder-tier-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  position: relative;
}

.ladder-tier-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card);
  transform: translateX(4px);
}

.ladder-tier-btn.active {
  border-color: var(--accent-primary);
  background: var(--jira-active-bg);
  box-shadow: inset 4px 0 0 var(--accent-primary);
}

.ladder-tier-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ladder-level-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ladder-tier-btn[data-tier="1"] .ladder-level-badge { background: rgba(56, 189, 248, 0.15); color: #38BDF8; border: 1px solid rgba(56, 189, 248, 0.3); }
.ladder-tier-btn[data-tier="2"] .ladder-level-badge { background: rgba(251, 191, 36, 0.15); color: #FBBF24; border: 1px solid rgba(251, 191, 36, 0.3); }
.ladder-tier-btn[data-tier="3"] .ladder-level-badge { background: rgba(52, 211, 153, 0.15); color: #34D399; border: 1px solid rgba(52, 211, 153, 0.3); }
.ladder-tier-btn[data-tier="4"] .ladder-level-badge { background: rgba(192, 132, 252, 0.15); color: #C084FC; border: 1px solid rgba(192, 132, 252, 0.3); }

.ladder-tier-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ladder-tier-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.ladder-tier-commitment {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* --- 8. Step-by-Step SOP 6-Step Pipeline (06_phuong_phap_doc_quyen) --- */
.sop-pipeline-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.sop-step-node-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-secondary);
  text-align: left;
}

.sop-step-node-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-card);
  transform: translateX(4px);
}

.sop-step-node-btn.active {
  border-color: var(--accent-emerald);
  background: var(--jira-active-bg);
  color: var(--text-primary);
  box-shadow: inset 4px 0 0 var(--accent-emerald);
}

.sop-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  font-size: 0.78rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.sop-step-node-btn.active .sop-step-num {
  background: var(--accent-emerald);
  color: #FFFFFF;
  border-color: var(--accent-emerald);
}

.sop-step-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.sop-step-title {
  font-size: 0.85rem;
  font-weight: 700;
}

.sop-step-phase {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* SOP Controls Bar */
.sop-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

/* --- 9. Multi-Channel Content Matrix (07_chien_luoc_marketing) --- */
.content-matrix-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
}

.matrix-cell-btn {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 10px;
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}

.matrix-cell-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card);
  transform: translateY(-2px);
}

.matrix-cell-btn.active {
  border-color: var(--accent-primary);
  background: var(--jira-active-bg);
  box-shadow: inset 0 3px 0 var(--accent-primary);
}

.matrix-cell-channel {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.matrix-cell-goal {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* --- 10. 15-Section Salepage Wireframe Mini-Map (08_salepage_spec) --- */
.wireframe-minimap-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}

.wireframe-section-node {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}

.wireframe-section-node:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card);
  transform: translateX(3px);
}

.wireframe-section-node.active {
  border-color: var(--accent-primary);
  background: var(--jira-active-bg);
  box-shadow: inset 3px 0 0 var(--accent-primary);
}

.wireframe-sec-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wireframe-sec-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 20px;
}

.wireframe-sec-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
}

.wireframe-sec-type {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  background: var(--bg-card);
  color: var(--text-muted);
}

/* Wireframe Details Inspector */
.wireframe-inspector-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wireframe-prompt-snippet {
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-primary);
  line-height: 1.5;
  white-space: pre-wrap;
}

/* --- Mobile Responsiveness for 2-Column Split Layout --- */
@media (max-width: 991px) {
  .wipa-split-layout-2col,
  .wipa-split-layout-3col {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .content-matrix-grid {
    grid-template-columns: 1fr;
  }
}

/* --- 11. Interactive Product Funnel Drawer on Showcase Cards (Hạng mục 10) --- */
.showcase-ecosystem-tiers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.showcase-tier-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card-muted);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.showcase-tier-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.showcase-tier-btn.active {
  background: var(--jira-active-bg);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  box-shadow: 0 0 0 1px var(--accent-primary);
}

.showcase-tier-btn[data-tier="lead_magnet"].active {
  border-color: #F59E0B;
  color: #D97706;
  background: rgba(245, 158, 11, 0.1);
  box-shadow: 0 0 0 1px #F59E0B;
}

.showcase-tier-btn[data-tier="elearning"].active {
  border-color: #3B82F6;
  color: #2563EB;
  background: rgba(59, 130, 246, 0.1);
  box-shadow: 0 0 0 1px #3B82F6;
}

.showcase-tier-btn[data-tier="core"].active {
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
  background: rgba(54, 179, 126, 0.1);
  box-shadow: 0 0 0 1px var(--accent-emerald);
}

.showcase-tier-btn[data-tier="high_ticket"].active {
  border-color: #8B5CF6;
  color: #7C3AED;
  background: rgba(139, 92, 246, 0.1);
  box-shadow: 0 0 0 1px #8B5CF6;
}

/* Funnel Drawer inside Showcase Card */
.showcase-tier-drawer {
  display: none;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--bg-card-muted);
  border: 1px solid var(--border-card);
  border-left: 3px solid var(--accent-primary);
  border-radius: var(--radius-xs);
  animation: fadeInDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.showcase-tier-drawer.open {
  display: flex;
}

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

.showcase-drawer-level {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.showcase-drawer-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
  font-size: 0.75rem;
  border-radius: var(--radius-xs);
  transition: color var(--transition-fast);
}

.showcase-drawer-close:hover {
  color: var(--text-primary);
}

.showcase-drawer-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.35;
}

.showcase-drawer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.showcase-drawer-format {
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-weight: 500;
}

.showcase-drawer-desc {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}

/* ==========================================================================
   ADVANCED VISUAL UI COMPONENTS (ZERO CARELESS WALL-OF-TEXT SYSTEM)
   Dành cho dự án Cố vấn nhân sinh và các dự án kinh doanh số WIPA
   ========================================================================== */

/* 1. Grid các nguồn dữ liệu đầu vào (Data Sources Grid) */
.source-input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin: 14px 0 16px;
}

.source-pill-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.source-pill-card:hover {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(16, 185, 129, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .source-pill-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .source-pill-card:hover {
  background: #f8fafc;
  border-color: #10b981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.12);
}

.source-pill-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.18);
  color: var(--accent-emerald);
  font-weight: 700;
  font-size: 0.82rem;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.source-pill-card.accent-cyan .source-pill-num {
  background: rgba(6, 182, 212, 0.18);
  color: var(--accent-cyan);
  border-color: rgba(6, 182, 212, 0.3);
}

.source-pill-card.accent-blue .source-pill-num {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}

.source-pill-card.accent-amber .source-pill-num {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

.source-pill-card.accent-purple .source-pill-num {
  background: rgba(168, 85, 247, 0.18);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.3);
}

.source-pill-body {
  flex: 1;
}

.source-pill-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.source-pill-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

/* 2. Thanh tiến trình quy trình cốt lõi (Pipeline Process Flow) */
.flow-pipeline-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 14px 0 18px;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

[data-theme="light"] .flow-pipeline-bar {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.flow-step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.flow-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--accent-emerald-subtle);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.flow-step-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.flow-step-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
}

.flow-arrow-sep {
  color: var(--text-muted);
  font-size: 1rem;
  flex-shrink: 0;
}

/* 3. Ma trận 3 Trục Tam Giác Hiện Thực (3-Axis Matrix Component) */
.matrix-axis-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 10px;
}

@media (max-width: 820px) {
  .matrix-axis-group {
    grid-template-columns: 1fr;
  }
}

.matrix-axis-card {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-subtle);
}

[data-theme="light"] .matrix-axis-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.matrix-axis-card.axis-info {
  border-top: 3px solid #06B6D4;
}

.matrix-axis-card.axis-energy {
  border-top: 3px solid #10B981;
}

.matrix-axis-card.axis-matter {
  border-top: 3px solid #F59E0B;
}

.matrix-axis-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border-subtle);
}

.matrix-axis-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.axis-info .matrix-axis-title { color: #06B6D4; }
.axis-energy .matrix-axis-title { color: #10B981; }
.axis-matter .matrix-axis-title { color: #F59E0B; }

.matrix-axis-badge {
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.matrix-tool-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.matrix-tool-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.38;
}

.matrix-tool-item strong {
  color: var(--text-primary);
  white-space: nowrap;
}

/* 4. Nấc thang tiến trình đa tầng (Progression Track Component) */
.progression-track {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin: 10px 0;
  flex-wrap: wrap;
}

.progression-step-card {
  flex: 1;
  min-width: 140px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-subtle);
  position: relative;
}

[data-theme="light"] .progression-step-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.progression-step-card .step-tier-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-emerald);
  text-transform: uppercase;
  margin-bottom: 2px;
  display: block;
}

.progression-step-card .step-tier-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.progression-step-card .step-tier-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin: 0;
}

/* 5. Highlight Callout Box */
.highlight-callout {
  padding: 12px 16px;
  margin: 14px 0;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.06);
  border-left: 4px solid var(--accent-emerald);
  border-top: 1px solid rgba(16, 185, 129, 0.15);
  border-right: 1px solid rgba(16, 185, 129, 0.15);
  border-bottom: 1px solid rgba(16, 185, 129, 0.15);
}

[data-theme="light"] .highlight-callout {
  background: rgba(16, 185, 129, 0.04);
}

.highlight-callout-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-emerald);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.highlight-callout-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

/* 6. Trực quan hóa Interactive Workflow Diagram cho Trang 06 */
.interactive-flow-canvas {
  padding: 20px 16px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-lg);
  margin: 16px 0;
}

[data-theme="light"] .interactive-flow-canvas {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
}

.flow-section-title {
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.flow-connector-down {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 12px 0;
  color: var(--accent-emerald);
  font-weight: 700;
  font-size: 1.2rem;
}

.flow-connector-down span {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: -2px;
}

/* ==========================================================================
   FLOATING ACTION BAR CHO INLINE EDITING (DOUBLE CLICK)
   ========================================================================== */
.wipa-inline-edit-floating-bar {
  position: absolute;
  z-index: 10001;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(16, 185, 129, 0.5);
  border-radius: 24px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 0 12px rgba(16, 185, 129, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeIn 0.15s ease-out;
  transform: translateY(-100%);
  margin-top: -8px;
}

[data-theme="light"] .wipa-inline-edit-floating-bar {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(16, 185, 129, 0.6);
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.2), 0 0 10px rgba(16, 185, 129, 0.25);
}

.floating-bar-btn {
  border: none;
  background: transparent;
  color: #f1f5f9;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

[data-theme="light"] .floating-bar-btn {
  color: #1e293b;
}

.floating-bar-btn.btn-open-modal {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(6, 182, 212, 0.25));
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.5);
}

.floating-bar-btn.btn-open-modal:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.4), rgba(6, 182, 212, 0.4));
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.floating-bar-btn.btn-save-inline {
  color: #10b981;
}

.floating-bar-btn.btn-save-inline:hover {
  background: rgba(16, 185, 129, 0.15);
}

.floating-bar-btn.btn-cancel-inline {
  color: #f87171;
}

.floating-bar-btn.btn-cancel-inline:hover {
  background: rgba(239, 68, 68, 0.15);
}

.floating-bar-divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 2px;
}

[data-theme="light"] .floating-bar-divider {
  background: rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   RICH TEXT / HTML MODAL STYLING
   ========================================================================== */
.rich-editor-dialog {
  max-width: 860px;
}

.rich-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.toolbar-select {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 4px 8px;
  font-size: 0.8rem;
  border-radius: var(--radius-xs);
  outline: none;
  cursor: pointer;
}

.toolbar-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 4px 8px;
  font-size: 0.8rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  transition: all 0.15s ease;
}

.toolbar-btn:hover {
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
  background: var(--bg-card-hover);
}

.toolbar-btn.active {
  background: var(--accent-emerald);
  color: #ffffff;
  border-color: var(--accent-emerald);
}

.toolbar-btn.color-dot-btn {
  font-size: 1.1rem;
  line-height: 1;
}

.toolbar-btn-toggle {
  font-family: 'Fira Code', monospace;
  font-weight: 700;
  color: var(--accent-cyan);
}

.toolbar-btn-toggle.active {
  background: var(--accent-cyan);
  color: #0f172a;
  border-color: var(--accent-cyan);
}

.rich-editor-canvas-wrap {
  position: relative;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  min-height: 320px;
  max-height: 480px;
  overflow-y: auto;
  background: var(--bg-card);
}

.rich-editor-visual {
  min-height: 320px;
  padding: 16px 20px;
  outline: none;
  line-height: 1.6;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.92rem;
}

.rich-editor-visual:focus {
  background: var(--bg-surface);
}

.rich-editor-visual p {
  margin-bottom: 12px;
}

.rich-editor-visual h1,
.rich-editor-visual h2,
.rich-editor-visual h3,
.rich-editor-visual h4 {
  margin-top: 14px;
  margin-bottom: 8px;
  font-family: var(--font-heading);
}

.rich-editor-visual ul,
.rich-editor-visual ol {
  padding-left: 24px;
  margin-bottom: 12px;
}

.rich-editor-source {
  width: 100%;
  min-height: 320px;
  padding: 16px;
  border: none;
  background: #090d16;
  color: #38bdf8;
  font-family: 'Fira Code', Consolas, Monaco, monospace;
  font-size: 0.84rem;
  line-height: 1.5;
  outline: none;
  resize: vertical;
}

[data-theme="light"] .rich-editor-source {
  background: #0f172a;
  color: #38bdf8;
}

.rich-editor-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding: 0 4px;
}

.rich-editor-anchor-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.rich-editor-anchor-toggle input[type="checkbox"] {
  accent-color: var(--accent-emerald);
  cursor: pointer;
}

/* ==========================================================================
   HERO BLOCKS SPLIT 50/50 INTERACTIVE LAYOUT
   ========================================================================== */
.wipa-hero-split-container {
  display: flex;
  gap: 16px;
  margin: 18px 0 24px;
  align-items: stretch;
}

.hero-blocks-column {
  flex: 0 0 calc(50% - 8px);
  width: calc(50% - 8px);
  display: flex;
  flex-direction: column;
}

.hero-blocks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  height: 100%;
}

.hero-interactive-block {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  user-select: none;
}

.hero-interactive-block:hover {
  border-color: var(--accent-emerald);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -4px rgba(0, 0, 0, 0.3);
}

.hero-interactive-block.active {
  border-color: var(--accent-emerald);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(6, 182, 212, 0.05) 100%);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.25);
}

[data-theme="light"] .hero-interactive-block.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(6, 182, 212, 0.08) 100%);
  border-color: #10b981;
}

/* Trạng thái Block đã được Click Chọn Cố Định (Tắt Hover Preview) */
.hero-interactive-block.is-selected {
  border-color: var(--accent-emerald);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16) 0%, rgba(6, 182, 212, 0.09) 100%);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.35);
  border-width: 1.5px;
}

.hero-interactive-block.is-selected::after {
  content: "📌 ĐÃ CHỌN";
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 0.6rem;
  font-weight: 800;
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 1px 6px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}

[data-theme="light"] .hero-interactive-block.is-selected::after {
  background: rgba(16, 185, 129, 0.2);
  color: #047857;
}

.wipa-hero-split-container.hero-has-selection .hero-interactive-block:not(.is-selected) {
  opacity: 0.85;
}

.wipa-hero-split-container.hero-has-selection .hero-interactive-block:not(.is-selected):hover {
  opacity: 1;
  border-color: var(--border-card-hover, #334155);
}

.hero-interactive-block.hero-block-full {
  grid-column: span 2;
}

.hero-block-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.hero-interactive-block .metric-val {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 4px;
  font-family: var(--font-heading);
}

.hero-interactive-block .metric-lbl {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.hero-block-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: all 0.2s ease;
}

.hero-interactive-block.active .hero-block-indicator {
  background: linear-gradient(90deg, var(--accent-emerald), var(--accent-cyan));
}

/* Right Column: Detail Explanations (50% Width) */
.hero-detail-column {
  flex: 0 0 calc(50% - 8px);
  width: calc(50% - 8px);
  display: flex;
  flex-direction: column;
}

.hero-detail-card {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  flex-direction: column;
  height: 100%;
  box-shadow: var(--shadow-sm);
  position: relative;
  border-left: 4px solid var(--accent-emerald);
}

.hero-detail-card.active {
  display: flex;
  animation: heroDetailFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes heroDetailFadeIn {
  from {
    opacity: 0;
    transform: translateX(6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.hero-detail-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: 12px;
}

.hero-detail-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 8px;
  font-family: var(--font-heading);
}

.hero-detail-lead {
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.hero-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.hero-detail-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.hero-detail-item strong {
  color: var(--text-primary);
  display: inline-block;
  margin-right: 4px;
}

.hero-detail-footer-note {
  margin-top: auto;
  padding: 8px 12px;
  background: rgba(16, 185, 129, 0.08);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-emerald);
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

[data-theme="light"] .hero-detail-footer-note {
  background: rgba(16, 185, 129, 0.1);
  color: #065f46;
}

/* Responsive cho Hero Split */
@media (max-width: 960px) {
  .wipa-hero-split-container {
    flex-direction: column;
  }
  .hero-blocks-column,
  .hero-detail-column {
    flex: 0 0 100%;
    width: 100%;
  }
}

/* ==========================================================================
   DIMENSION CARDS & SUB-BLOCK BUILDER COMPONENTS
   ========================================================================== */
.axis-dimension-card {
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--transition-fast);
}

.axis-dimension-card:hover {
  border-color: var(--border-card);
  box-shadow: var(--shadow-sm);
}

.axis-card-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.axis-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 9999px;
  width: fit-content;
}

.axis-badge-info {
  background: rgba(6, 182, 212, 0.12);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.axis-badge-energy {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.axis-badge-matter {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.axis-card-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  font-family: var(--font-heading);
}

.axis-nature-box {
  background: var(--bg-surface);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.axis-nature-box .nature-tag {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-right: 4px;
}

.sub-block-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sub-block-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.sub-block-item:hover {
  transform: translateY(-1px);
}

.sub-block-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sub-block-content {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.52;
}

.sub-block-reality {
  border-left: 3px solid #06b6d4;
}
.sub-block-reality .sub-block-label {
  color: #06b6d4;
}

.sub-block-bottleneck {
  border-left: 3px solid #f59e0b;
}
.sub-block-bottleneck .sub-block-label {
  color: #f59e0b;
}

.sub-block-target {
  border-left: 3px solid #10b981;
}
.sub-block-target .sub-block-label {
  color: #10b981;
}

/* ==========================================================================
   3 AUDIENCE TABS & SUBMENU NAVIGATION SYSTEM
   ========================================================================== */
.workspace-audience-tabs-bar {
  background: var(--bg-surface, #14171B);
  border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
  padding: 8px 24px 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.workspace-audience-tabs-bar::-webkit-scrollbar {
  display: none;
}

.audience-tabs-container {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.audience-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  color: var(--text-secondary, #94A3B8);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  position: relative;
  user-select: none;
}

.audience-tab-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary, #F8FAFC);
}

.audience-tab-btn.active {
  background: var(--bg-card, #1A1E24);
  color: var(--text-primary, #FFFFFF);
  border-color: var(--border-card, rgba(255, 255, 255, 0.16));
  border-bottom-color: var(--bg-card, #1A1E24);
  font-weight: 700;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.audience-tab-btn.active::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
}

.audience-tab-btn[data-tab-id="customer"].active::before {
  background: #10B981;
}

.audience-tab-btn[data-tab-id="recruitment"].active::before {
  background: #06B6D4;
}

.audience-tab-btn[data-tab-id="full"].active::before {
  background: #579DFF;
}

.audience-tab-icon {
  font-size: 1rem;
}

.audience-tab-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted, #64748B);
}

.audience-tab-btn.active .audience-tab-badge {
  background: var(--bg-card-muted, rgba(255, 255, 255, 0.16));
  color: var(--text-primary, #E2E8F0);
}

/* Light Theme Overrides for Audience Tabs */
[data-theme="light"] .audience-tab-btn {
  background: rgba(9, 30, 66, 0.04);
  border: 1px solid var(--border-subtle, #DFE1E6);
  border-bottom: none;
  color: var(--text-secondary, #44546F);
}

[data-theme="light"] .audience-tab-btn:hover {
  background: rgba(9, 30, 66, 0.08);
  color: var(--text-primary, #172B4D);
}

[data-theme="light"] .audience-tab-btn.active {
  background: #FFFFFF !important;
  color: #172B4D !important;
  border-color: #DCDFE4;
  border-bottom-color: #FFFFFF !important;
}

[data-theme="light"] .audience-tab-badge {
  background: #EBECF0;
  color: #626F86;
}

[data-theme="light"] .audience-tab-btn.active .audience-tab-badge {
  background: #EBECF0;
  color: #172B4D;
}

/* Sub-Menu Bar for Active Audience Tab */
.workspace-submenu-bar {
  background: var(--bg-card, #1A1E24);
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.workspace-submenu-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.workspace-submenu-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 6px;
  background: var(--bg-card-muted, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  color: var(--text-secondary, #94A3B8);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.workspace-submenu-pill:hover {
  background: var(--bg-card-hover, rgba(255, 255, 255, 0.08));
  color: var(--text-primary, #FFFFFF);
  border-color: var(--border-card, rgba(255, 255, 255, 0.18));
}

.workspace-submenu-pill.active {
  background: rgba(87, 157, 255, 0.15);
  border-color: rgba(87, 157, 255, 0.4);
  color: #579DFF;
  font-weight: 600;
}

.workspace-submenu-pill.tab-customer.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #10B981;
}

.workspace-submenu-pill.tab-recruitment.active {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.4);
  color: #06B6D4;
}

/* Light Theme Overrides for Submenu Navigation */
[data-theme="light"] .workspace-submenu-pill {
  background: #F4F5F7;
  border-color: #DFE1E6;
  color: #44546F;
}

[data-theme="light"] .workspace-submenu-pill:hover {
  background: #EBECF0;
  color: #172B4D;
  border-color: #0C66E4;
}

[data-theme="light"] .workspace-submenu-pill.active {
  background: #E9F2FF;
  border-color: #0C66E4;
  color: #0055CC;
  font-weight: 700;
}

[data-theme="light"] .workspace-submenu-pill.tab-customer.active {
  background: #E3FCEF;
  border-color: #36B37E;
  color: #006644;
  font-weight: 700;
}

[data-theme="light"] .workspace-submenu-pill.tab-recruitment.active {
  background: #E6FCFF;
  border-color: #008DA6;
  color: #004953;
  font-weight: 700;
}

/* Sidebar Tab Group Headers - Clean Minimal Subgroup Section */
.sidebar-tab-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 6px 4px 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #64748B);
  border-top: none;
  margin-top: 6px;
}

.sidebar-tab-group-header:first-child {
  margin-top: 2px;
}

.sidebar-tab-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sidebar-tab-title .sidebar-svg-icon {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  opacity: 0.85;
}

.sidebar-project-icon .sidebar-svg-icon {
  width: 16px;
  height: 16px;
  stroke: var(--accent-emerald, #10B981);
}

/* ==========================================================================
   TOPBAR SECRET LOCK BUTTON & MODAL
   ========================================================================== */
.btn-secret-lock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-md, 6px);
  background: var(--bg-card, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  color: var(--text-secondary, #94A3B8);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-secret-lock:hover {
  background: var(--bg-card-hover, rgba(255, 255, 255, 0.08));
  color: var(--text-primary, #FFFFFF);
  border-color: var(--accent-gold, #D4AF37);
  transform: translateY(-1px);
}

.btn-secret-lock.unlocked {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--accent-emerald, #10B981);
}

.btn-secret-lock.unlocked:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--accent-emerald, #10B981);
}

.secret-lock-icon {
  font-size: 0.9rem;
  line-height: 1;
}

.secret-lock-label {
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.secret-status-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md, 6px);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--text-primary, #FFFFFF);
  font-size: 0.82rem;
  line-height: 1.4;
  transition: all 0.2s ease;
}

.secret-status-alert.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--accent-emerald, #10B981);
}

.secret-status-alert.alert-error {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.4);
  color: var(--accent-rose, #F43F5E);
}

/* ==========================================================================
   USER AUTHENTICATION, RBAC & OTP 2FA STYLING
   ========================================================================== */
.user-auth-area {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.btn-auth-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: var(--radius-md, 6px);
  background: var(--bg-card, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  color: var(--text-primary, #F8FAFC);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-auth-login:hover {
  background: var(--bg-card-hover, rgba(255, 255, 255, 0.08));
  border-color: var(--accent-gold, #D4AF37);
  transform: translateY(-1px);
}

.user-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: var(--radius-md, 6px);
  background: var(--bg-card, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.user-profile-badge:hover {
  background: var(--bg-card-hover, rgba(255, 255, 255, 0.08));
  border-color: var(--accent-emerald, #10B981);
}

.user-avatar-img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-surface, #1E293B);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.user-display-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary, #F8FAFC);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role-chip {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.chip-super-admin {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--accent-gold, #D4AF37);
}

.chip-admin {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: var(--accent-sky, #38BDF8);
}

.chip-content-editor, .chip-editor {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--accent-emerald, #10B981);
}

/* User Management Tabs */
.user-mgmt-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  margin-bottom: 16px;
}

.user-mgmt-tab-btn {
  background: none;
  border: none;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted, #94A3B8);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.user-mgmt-tab-btn:hover {
  color: var(--text-primary, #F8FAFC);
}

.user-mgmt-tab-btn.active {
  color: var(--accent-gold, #D4AF37);
  border-bottom-color: var(--accent-gold, #D4AF37);
}

/* User Table */
.user-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md, 6px);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  background: var(--bg-card, rgba(255, 255, 255, 0.02));
}

.user-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: left;
}

.user-table th {
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.15);
  color: var(--text-muted, #94A3B8);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
}

.user-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.05));
  color: var(--text-secondary, #CBD5E1);
  vertical-align: middle;
}

.user-table tr:hover td {
  background: var(--bg-card-hover, rgba(255, 255, 255, 0.03));
}

/* Quick Dev Login Cards */
.quick-login-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.quick-login-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  border-radius: var(--radius-md, 6px);
  background: var(--bg-card, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  color: var(--text-primary, #F8FAFC);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.quick-login-btn:hover {
  background: var(--bg-card-hover, rgba(255, 255, 255, 0.08));
  border-color: var(--accent-gold, #D4AF37);
  transform: translateY(-2px);
}

.quick-login-title {
  font-weight: 700;
  font-size: 0.8rem;
}

.quick-login-desc {
  font-size: 0.7rem;
  color: var(--text-muted, #94A3B8);
}

/* Secret & OTP Display Box */
.secret-key-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed var(--border-color, rgba(255, 255, 255, 0.15));
  padding: 12px;
  border-radius: var(--radius-md, 6px);
  font-family: monospace;
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: var(--accent-gold, #D4AF37);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0;
}

/* ==========================================================================
   SIDEBAR USER PROFILE & AUTH CARD
   ========================================================================== */
.sidebar-user-section {
  padding: 10px 14px 8px 14px;
  background: var(--bg-sidebar);
  border-top: 1px solid var(--border-subtle);
}

.sidebar-user-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-card, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-md, 8px);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
}

.sidebar-user-card:hover {
  background: var(--bg-card-hover, rgba(255, 255, 255, 0.07));
  border-color: var(--accent-emerald);
  transform: translateY(-1px);
}

.sidebar-user-card.pulse-highlight {
  animation: pulseHighlight 1.2s ease-in-out 2;
}

@keyframes pulseHighlight {
  0%, 100% { border-color: var(--border-subtle); box-shadow: none; }
  50% { border-color: var(--accent-gold); box-shadow: 0 0 14px rgba(212, 175, 55, 0.5); }
}

.sidebar-user-avatar-wrap {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card-muted);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-user-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-user-icon-placeholder {
  width: 100%;
  height: 100%;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-user-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip-guest {
  color: var(--text-muted, #94A3B8);
}

.sidebar-user-action-btn {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.sidebar-user-card:hover .sidebar-user-action-btn {
  background: var(--accent-emerald);
  color: #000;
}

/* Sidebar User Actions Group (Switch & Logout) */
.sidebar-user-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.sidebar-action-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-xs, 4px);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
  line-height: 1;
}

.sidebar-action-icon-btn:hover {
  transform: scale(1.1);
}

.sidebar-action-icon-btn.btn-quick-switch:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38BDF8;
  color: #38BDF8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

.sidebar-action-icon-btn.btn-quick-logout:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #EF4444;
  color: #EF4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

/* Account Switch Modal Items */
.account-switch-item {
  width: 100%;
  box-sizing: border-box;
}

.account-switch-item:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-1px);
}

/* Fallback safety rule: any residual modal-backdrop must never display */
.modal-backdrop {
  display: none !important;
}

/* Guest & RBAC Disabled-Locked State */
.btn.disabled-locked,
button.disabled-locked {
  opacity: 0.65;
  cursor: not-allowed !important;
  background: var(--bg-card, rgba(255, 255, 255, 0.05)) !important;
  color: var(--text-muted, #94A3B8) !important;
  border-color: var(--border-subtle, rgba(255, 255, 255, 0.1)) !important;
  box-shadow: none !important;
}

body.mode-guest [contenteditable="true"] {
  outline: none !important;
  cursor: default !important;
}

/* ==========================================================================
   TERMS MANAGER - INLINE EDITABLE SPREADSHEET TABLE
   ========================================================================== */
.terms-table-scroll-wrapper {
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(88vh - 230px);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-card);
}

.terms-inline-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: left;
}

.terms-inline-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--bg-card-muted, #141A23);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 12px;
  border-bottom: 2px solid var(--border-card);
  white-space: nowrap;
}

.terms-inline-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-fast);
}

.terms-inline-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.terms-inline-table tbody tr.row-new {
  background: rgba(16, 185, 129, 0.05);
}

.terms-inline-table td {
  padding: 6px 8px;
  vertical-align: top;
}

.term-cell-num {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
  text-align: center;
  padding-top: 10px !important;
  user-select: none;
}

.term-input-field,
.term-textarea-field {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 0.81rem;
  padding: 6px 8px;
  transition: all var(--transition-fast);
  box-sizing: border-box;
  font-family: inherit;
}

.term-input-field:hover,
.term-textarea-field:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-subtle);
}

.term-input-field:focus,
.term-textarea-field:focus {
  background: var(--bg-card);
  border-color: var(--accent-emerald, #10B981);
  outline: none;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.term-field-canonical {
  font-weight: 700;
  color: #10B981 !important;
}

.term-field-category {
  font-size: 0.78rem;
  color: #38BDF8 !important;
}

.term-textarea-field {
  resize: vertical;
  min-height: 32px;
  line-height: 1.4;
}

.term-field-deprecated {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #F87171 !important;
  font-size: 0.77rem;
}

.btn-del-term-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  margin-top: 3px;
}

.btn-del-term-row:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #EF4444;
  transform: scale(1.1);
}

/* ==========================================================================
   TIER STACK RECTANGLE HIERARCHY & RICH TOOLTIP INTERACTION
   ========================================================================== */
.tier-stack-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 860px;
  margin: 0 auto;
}

.tier-stack-row {
  display: flex;
  justify-content: center;
  width: 100%;
}

.tier-stack-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg, 12px);
  padding: 14px 18px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  box-sizing: border-box;
}

.tier-stack-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  border-color: currentColor;
}

.tier-stack-card.tier-4 {
  width: 58%;
  min-width: 320px;
  border-left: 5px solid var(--accent-amber, #F59E0B);
  color: var(--accent-amber, #F59E0B);
}

.tier-stack-card.tier-3 {
  width: 72%;
  min-width: 360px;
  border-left: 5px solid var(--accent-purple, #A855F7);
  color: var(--accent-purple, #A855F7);
}

.tier-stack-card.tier-2 {
  width: 86%;
  min-width: 400px;
  border-left: 5px solid var(--accent-cyan, #06B6D4);
  color: var(--accent-cyan, #06B6D4);
}

.tier-stack-card.tier-1 {
  width: 100%;
  border-left: 5px solid var(--accent-emerald, #10B981);
  color: var(--accent-emerald, #10B981);
}

.tier-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.tier-card-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.tier-card-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 9999px;
  background: var(--bg-surface, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--border-subtle);
}

.tier-card-roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.tier-role-pill {
  position: relative;
  background: var(--bg-canvas, var(--bg-surface));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm, 6px);
  padding: 6px 10px;
  text-align: left;
  transition: all 0.18s ease;
  cursor: pointer;
}

.tier-role-pill:hover {
  background: var(--bg-card-hover, rgba(255, 255, 255, 0.08));
  border-color: currentColor;
  transform: scale(1.02);
}

.tier-role-pill-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 2px;
}

.tier-role-pill-count {
  font-size: 0.69rem;
  color: var(--text-muted);
  display: block;
}

/* Rich Interactive Tooltip */
.tier-rich-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: 320px;
  max-width: 90vw;
  background: #0B0F17;
  color: #F8FAFC;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 999;
  text-align: left;
}

.tier-rich-tooltip strong {
  color: #FFFFFF !important;
  font-weight: 700;
}

.tier-rich-tooltip .tier-rich-tooltip-body,
.tier-rich-tooltip div {
  color: #E2E8F0;
}

.tier-rich-tooltip .tier-rich-tooltip-title {
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.tier-rich-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #0B0F17 transparent transparent transparent;
}

[data-theme="light"] .tier-rich-tooltip {
  background: #FFFFFF !important;
  color: #0F172A !important;
  border: 1px solid #CBD5E1 !important;
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.16), 0 6px 16px -2px rgba(15, 23, 42, 0.08) !important;
}

[data-theme="light"] .tier-rich-tooltip .tier-rich-tooltip-body,
[data-theme="light"] .tier-rich-tooltip div {
  color: #334155 !important;
}

[data-theme="light"] .tier-rich-tooltip strong {
  color: #0F172A !important;
  font-weight: 700;
}

[data-theme="light"] .tier-rich-tooltip::after {
  border-color: #FFFFFF transparent transparent transparent !important;
}

.tier-role-pill:hover .tier-rich-tooltip,
.tier-stack-card:hover > .tier-rich-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
  .tier-stack-card.tier-4,
  .tier-stack-card.tier-3,
  .tier-stack-card.tier-2,
  .tier-stack-card.tier-1 {
    width: 100%;
    min-width: 0;
  }
}

/* ==========================================================================
   DASHBOARD 2-TAB SWITCHER & HERO EXPERIENCE
   ========================================================================== */
.dash-mode-switcher-bar {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.dash-mode-tabs-container {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.dash-mode-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-mode-tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

.dash-mode-tab-btn.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-focus);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.dash-mode-icon {
  font-size: 1.1rem;
}

.dash-mode-pill {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  font-weight: 700;
  letter-spacing: 0.3px;
}

.dash-mode-pill.tech-pill {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
}

.dash-subpanel {
  display: block;
  animation: fadeInPanel 0.25s ease-out;
}

@keyframes fadeInPanel {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 5-Column Metrics Grid */
.metrics-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 24px;
}

@media (max-width: 1100px) {
  .metrics-grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .metrics-grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Dashboard Content Block Headers */
.dash-content-block {
  margin-top: 48px;
}

.dash-block-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 32px auto;
}

.dash-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.dash-section-heading {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.35;
  margin: 0 0 10px 0;
}

.dash-section-sub {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Triết Lý Khởi Nghiệp Tận Gốc Grid */
.dash-phil-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 960px) {
  .dash-phil-grid {
    grid-template-columns: 1fr;
  }
}

.dash-phil-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-phil-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-focus);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.phil-card-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.phil-card-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-cyan);
  margin-bottom: 6px;
}

.dash-phil-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 12px 0;
  line-height: 1.35;
}

.dash-phil-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0 0 18px 0;
  flex-grow: 1;
}

.phil-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.phil-tag {
  font-size: 0.72rem;
  padding: 3px 8px;
  background: var(--bg-surface);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

/* 4-Step Non-Tech Workflow */
.dash-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

@media (max-width: 1024px) {
  .dash-steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .dash-steps-grid {
    grid-template-columns: 1fr;
  }
}

.dash-step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  transition: all 0.2s ease;
}

.dash-step-card:hover {
  border-color: var(--accent-emerald);
  transform: translateY(-2px);
}

.step-card-num {
  font-size: 1.75rem;
  font-weight: 900;
  font-family: var(--font-mono);
  color: rgba(16, 185, 129, 0.35);
  margin-bottom: 8px;
  line-height: 1;
}

.step-card-icon {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.dash-step-card h3 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.dash-step-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

.dash-cta-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 0.98rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* 7 Trụ Cột Tri Thức Bento Grid */
.dash-pillars-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

@media (max-width: 1024px) {
  .dash-pillars-bento {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-pillars-bento .bento-span-2 {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .dash-pillars-bento {
    grid-template-columns: 1fr;
  }
  .dash-pillars-bento .bento-span-2 {
    grid-column: span 1;
  }
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.bento-card:hover {
  border-color: var(--accent-emerald);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.bento-card:active {
  transform: scale(0.99);
}

.bento-span-2 {
  grid-column: span 2;
}

.bento-icon-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.1);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  width: fit-content;
  margin-bottom: 12px;
  border: 1px solid rgba(56, 189, 248, 0.18);
}

.bento-card h3 {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 10px 0;
  line-height: 1.35;
}

.bento-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 16px 0;
  flex-grow: 1;
}

.bento-gems {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.bento-gem-pill {
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

/* ==========================================================================
   GUEST TEASER & READER MODAL FOR VISITORS (UNAUTHENTICATED)
   ========================================================================== */
.guest-teaser-card {
  padding: 8px 4px;
}

.guest-meta-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(56, 189, 248, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 22px;
}

.guest-meta-banner .badge-gem {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-emerald);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.guest-meta-banner .gem-hook {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.45;
  margin: 0;
}

.guest-section-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 20px;
}

.guest-section-box h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guest-principles-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guest-principle-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.guest-principle-icon {
  color: var(--accent-emerald);
  font-size: 1rem;
  line-height: 1.3;
}

.guest-app-box {
  background: rgba(56, 189, 248, 0.06);
  border-color: rgba(56, 189, 248, 0.2);
}

.guest-cta-card {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-surface));
  border: 1px solid var(--accent-emerald);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  margin: 28px 0 20px 0;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.guest-cta-card h4 {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.guest-cta-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 580px;
  margin: 0 auto 18px auto;
}

.guest-cta-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.guest-full-accordion {
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
  margin-top: 20px;
}

.guest-full-accordion summary {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px 0;
  transition: color 0.2s;
  user-select: none;
}

.guest-full-accordion summary:hover {
  color: var(--text-primary);
}

.guest-full-content-body {
  padding-top: 14px;
  border-top: 1px dashed var(--border-subtle);
  margin-top: 10px;
}

/* ==========================================================================
   WIPA ECOSYSTEM & ALLIANCE HUB STYLES
   ========================================================================== */
.ecosystem-hero-header {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(229, 184, 105, 0.05), var(--bg-surface));
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.eco-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.ecosystem-main-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 14px;
}

.ecosystem-main-sub {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 820px;
  margin-bottom: 24px;
}

.eco-metrics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.eco-metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-md);
}

.eco-metric-pill .pill-num {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--accent-cyan);
}

.eco-metric-pill.accent-amber .pill-num {
  color: var(--accent-amber);
}

.eco-metric-pill.accent-emerald .pill-num {
  color: var(--accent-emerald);
}

.eco-metric-pill.accent-indigo .pill-num {
  color: #818cf8;
}

.eco-metric-pill .pill-txt {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Architecture Tree Nodes */
.eco-tree-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 12px 0;
}

.eco-tree-node {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.eco-tree-node:hover {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-md);
}

.eco-tree-node.tier-0 {
  border-left: 4px solid var(--accent-cyan);
  background: linear-gradient(135deg, rgba(0, 184, 217, 0.05), var(--bg-card));
}

.eco-tree-node.tier-1 {
  border-left: 4px solid var(--accent-amber);
  background: linear-gradient(135deg, rgba(255, 171, 0, 0.05), var(--bg-card));
}

.eco-tree-node.tier-2 {
  border-left: 4px solid var(--accent-emerald);
  background: linear-gradient(135deg, rgba(54, 179, 126, 0.05), var(--bg-card));
  display: flex;
  flex-direction: column;
}

.node-badge {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--accent-cyan);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.tier-1 .node-badge {
  color: var(--accent-amber);
}

.tier-2 .node-badge {
  color: var(--accent-emerald);
}

.node-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.node-card.clickable {
  cursor: pointer;
}

.node-card.sub-card {
  flex-direction: column;
  height: 100%;
  gap: 14px;
}

.node-icon {
  font-size: 2rem;
  line-height: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.node-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.node-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.node-info h3 {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.35;
}

.node-info p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 6px 0 14px 0;
  flex: 1;
}

.node-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.node-tag {
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 3px 9px;
  border-radius: var(--radius-sm);
}

.node-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

.btn-xs-primary {
  background: var(--accent-emerald);
  color: #ffffff;
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-xs-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-xs-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-card);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-xs-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
}

.eco-tree-connector {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}

.connector-line {
  width: 2px;
  height: 20px;
  background: var(--border-card);
}

.eco-connector-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  padding: 5px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-emerald);
  box-shadow: var(--shadow-sm);
  letter-spacing: 0.02em;
}

.eco-tree-split-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

/* Dispatch Flow Grid */
.dispatch-flow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.dispatch-flow-step {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  position: relative;
}

.flow-step-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-emerald);
  margin-bottom: 8px;
  opacity: 0.85;
}

.dispatch-flow-step h4 {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px 0;
}

.dispatch-flow-step p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* Alliance Units Grid */
.alliance-units-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.alliance-unit-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s, border-color 0.15s;
}

.alliance-unit-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-emerald);
}

.unit-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.unit-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.unit-meta h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 2px 0;
}

.unit-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-amber);
}

.unit-trigger, .unit-outcome, .unit-affiliate {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.unit-trigger strong, .unit-outcome strong, .unit-affiliate strong {
  color: var(--text-primary);
}

.unit-affiliate {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: var(--accent-emerald);
  font-weight: 600;
}

/* 3 Strategic Layers Bento */
.strategic-layers-bento {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.strat-layer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.strat-layer-card.layer-thien {
  border-top: 4px solid #818cf8;
}

.strat-layer-card.layer-dia {
  border-top: 4px solid var(--accent-amber);
}

.strat-layer-card.layer-nhan {
  border-top: 4px solid var(--accent-emerald);
}

.strat-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.strat-icon {
  font-size: 2rem;
  line-height: 1;
}

.strat-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.strat-header h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 2px 0 0 0;
}

.strat-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

.strat-tools-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.strat-tool-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.strat-tool-item .tool-bullet {
  color: var(--accent-emerald);
  font-weight: bold;
}

.strat-tool-item strong {
  color: var(--text-primary);
}

.strat-outcome {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--border-subtle);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.strat-outcome strong {
  color: var(--accent-emerald);
}

/* Projects Directory Grid */
.eco-projects-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
