/* ==========================================================================
   CUANTICA PRODUCTIVITĂȚII - Dedicated Book & Interactive Course Styling
   NEW BASARA CONSULT 2026
   ========================================================================== */

/* Hero Section for the Book */
.book-hero {
  position: relative;
  padding: 7rem 0 4rem;
  background: radial-gradient(ellipse at top center, rgba(37, 99, 235, 0.15), transparent 70%),
              radial-gradient(ellipse at bottom right, rgba(245, 158, 11, 0.08), transparent 60%),
              var(--bg-primary, #0b1120);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.book-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 3.5rem;
  align-items: center;
}

@media (max-width: 992px) {
  .book-hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }
}

.book-hero-cover-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.book-hero-cover-wrap::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 420px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.35) 0%, rgba(245, 158, 11, 0.15) 50%, transparent 70%);
  filter: blur(40px);
  z-index: 0;
  pointer-events: none;
}

.book-3d-img {
  position: relative;
  z-index: 1;
  max-width: 380px;
  width: 100%;
  border-radius: 12px;
  box-shadow: -15px 25px 45px rgba(0, 0, 0, 0.7), 0 0 30px rgba(59, 130, 246, 0.25);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.book-3d-img:hover {
  transform: translateY(-8px) rotate(-1.5deg) scale(1.02);
  box-shadow: -20px 35px 55px rgba(0, 0, 0, 0.8), 0 0 45px rgba(59, 130, 246, 0.4);
}

.book-hero-meta {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.book-hero-tagline {
  font-size: 1.15rem;
  color: #93c5fd;
  font-style: italic;
  line-height: 1.5;
  border-left: 3px solid #3b82f6;
  padding-left: 1rem;
}

@media (max-width: 992px) {
  .book-hero-tagline {
    border-left: none;
    padding-left: 0;
  }
}

.book-specs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.5rem 0;
}

@media (max-width: 992px) {
  .book-specs-chips {
    justify-content: center;
  }
}

.book-spec-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.35rem 0.85rem;
  border-radius: 99px;
  font-size: 0.82rem;
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.book-spec-chip strong {
  color: #fff;
}

.book-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

@media (max-width: 992px) {
  .book-hero-actions {
    justify-content: center;
  }
}

/* Course Section Wrapper */
.cuantica-course-section {
  position: relative;
  padding: 3.5rem 0 5rem;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 36px 36px, 36px 36px;
  overflow: hidden;
}

.course-section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.course-toolbar-card {
  max-width: 1560px;
  margin: 0 auto 1.5rem;
  padding: 1rem 1.5rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.course-search-box {
  flex: 1;
  min-width: 280px;
  max-width: 420px;
  position: relative;
}

.course-search-input {
  width: 100%;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 0.6rem 1rem 0.6rem 2.4rem;
  border-radius: 99px;
  font-size: 0.86rem;
  outline: none;
  transition: all 0.2s ease;
}

.course-search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.35);
}

.course-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 0.95rem;
  pointer-events: none;
}

.course-toolbar-buttons {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* Book Order Box in bottom */
.book-order-section {
  padding: 4.5rem 0;
  background: linear-gradient(180deg, var(--bg-primary, #0b1120) 0%, #0f172a 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.order-box-card {
  max-width: 900px;
  margin: 0 auto;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 30px rgba(245, 158, 11, 0.1);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (max-width: 768px) {
  .order-box-card {
    grid-template-columns: 1fr;
    padding: 1.75rem;
    gap: 1.75rem;
  }
}


/* ==========================================================================
   CUANTICA PRODUCTIVITĂȚII - Harta Interactivă & Curs Online
   Design System: Industrial Dark / High-Precision Engineering
   ========================================================================== */

:root {
  --bg-main: #0a0e17;
  --bg-surface: #111827;
  --bg-card: rgba(17, 24, 39, 0.85);
  --bg-card-hover: rgba(30, 41, 59, 0.9);
  --bg-glass: rgba(15, 23, 42, 0.75);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(255, 255, 255, 0.2);
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  /* Culorile Categoriilor din Matricea Cauză-Efect (8 Module) */
  --c-desen: #2563eb;        /* Modulul I: Desen */
  --c-semifab: #0284c7;      /* Modulul II: Semifabricat */
  --c-mu: #059669;           /* Modulul III: M.U. */
  --c-fixare: #d97706;       /* Modulul IV: Fixare */
  --c-scule: #dc2626;        /* Modulul V: Scule & Carbură */
  --c-racire: #06b6d4;       /* Modulul VI: Răcire */
  --c-tribologie: #8b5cf6;   /* Modulul VII: Tribologie */
  --c-profit: #eab308;       /* Modulul VIII: Parametri & Profit */

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}


/* ==========================================================================
   Bara de derulare personalizată (Ultra-Sleek Dark Mode)
   Elimină barele gri late și inestetice din Windows (17px)
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(10, 14, 23, 0.4);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 99px;
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(96, 165, 250, 0.55);
}

::-webkit-scrollbar-corner {
  background: transparent;
}


html, body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Background grid tehnic */
body {
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 36px 36px, 36px 36px;
}

/* Header Principal */
.course-app-header-legacy {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.55rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.35);
}

.brand-text h1 {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-text h1 span {
  background: linear-gradient(90deg, #60a5fa, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-author {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.brand-author strong {
  color: #e2e8f0;
}

/* Bara de comenzi din Header */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.48rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-main);
  transition: var(--transition);
  text-decoration: none;
}

.btn:hover {
  background: #1e293b;
  border-color: var(--border-focus);
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #3b82f6;
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.btn-tour {
  background: linear-gradient(135deg, #059669, #047857);
  border-color: #10b981;
  color: #fff;
}

.btn-tour:hover {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

/* Control Bar & Legendă */
.control-bar {
  max-width: 1560px;
  margin: 0.4rem auto 0.2rem;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.matrix-legend {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  transition: var(--transition);
}

.legend-item:hover, .legend-item.active {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-subtle);
  color: var(--text-main);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.stats-badge {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  padding: 0.3rem 0.7rem;
  border-radius: 99px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stats-badge span.count {
  color: var(--c-mu);
  font-weight: 700;
}

/* Stage-ul Principal al Matricei - EXACT 2 RÂNDURI X 4 COLOANE */
.matrix-stage-container {
  position: relative;
  max-width: 1560px;
  margin: 0.25rem auto 0.8rem;
  padding: 0 1rem;
}

.matrix-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  z-index: 10;
}

/* SVG Overlay pentru săgețile Bezier */
#connections-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

.svg-connection {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
  transition: stroke 0.3s ease, stroke-width 0.3s ease, opacity 0.3s ease;
  opacity: 0.45;
}

.svg-connection.highlight-outgoing {
  stroke: #60a5fa;
  stroke-width: 2.5;
  stroke-dasharray: none;
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(96, 165, 250, 0.6));
  animation: pulsePath 2s infinite ease-in-out;
}

.svg-connection.highlight-incoming {
  stroke: #34d399;
  stroke-width: 2.5;
  stroke-dasharray: none;
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(52, 211, 153, 0.6));
}

@keyframes pulsePath {
  0%, 100% { stroke-width: 2.5; opacity: 1; }
  50% { stroke-width: 3.2; opacity: 0.8; }
}

/* Cardurile de Categorie - Optimizate Compact pentru 2 Rânduri */
.category-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: var(--transition);
  position: relative;
  overflow: visible;
  min-height: 235px;
}

.category-card:hover {
  border-color: var(--border-focus);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

.category-card.dimmed {
  opacity: 0.25;
  filter: grayscale(50%);
}

.category-card.tour-active {
  border-color: var(--card-color, #3b82f6) !important;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.35);
  transform: scale(1.015);
  z-index: 20;
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.cat-title-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.cat-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.cat-title-group h2 {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  white-space: nowrap;
}

.cat-role {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.45rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  white-space: nowrap;
}

.cat-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Grila de Taburi din Interiorul Categoriei */
.tabs-container {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: auto;
}

.tabs-container.dense-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.28rem;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 0.38rem 0.55rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.78rem;
  text-align: left;
  position: relative;
  user-select: none;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--card-color, rgba(255, 255, 255, 0.2));
  transform: translateX(2px);
}

.tab-btn.active {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.05));
  border-color: var(--card-color, #3b82f6);
  box-shadow: inset 2px 0 0 var(--card-color, #3b82f6), 0 0 12px rgba(59, 130, 246, 0.25);
  font-weight: 700;
  color: #fff;
}

.tab-btn.outgoing-target {
  border-color: #60a5fa !important;
  background: rgba(96, 165, 250, 0.14) !important;
  box-shadow: 0 0 8px rgba(96, 165, 250, 0.3);
}

.tab-btn.incoming-source {
  border-color: #34d399 !important;
  background: rgba(52, 211, 153, 0.14) !important;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.3);
}

.tab-name {
  font-weight: 600;
  font-size: 0.76rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab-sub {
  font-size: 0.62rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab-arrow-ind {
  opacity: 0.25;
  font-size: 0.68rem;
  transition: var(--transition);
  flex-shrink: 0;
}


.tab-btn:hover .tab-arrow-ind, .tab-btn.active .tab-arrow-ind {
  opacity: 1;
  color: var(--card-color, #3b82f6);
  transform: translateX(2px);
}

/* Cardul de Rezultat / Macro-Obiectiv (Economic) */
.outcome-banner {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.1) 0%, rgba(17, 24, 39, 0.9) 100%);
  border: 1px solid rgba(234, 179, 8, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.outcome-info h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fde047;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.outcome-info p {
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: 650px;
  margin-top: 0.2rem;
}

.outcome-metrics {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.metric-pill {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(234, 179, 8, 0.2);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  text-align: center;
}

.metric-pill .label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.metric-pill .val {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-mono);
}

/* Drawer Culisant (Panoul Capitolului din Carte) */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.chapter-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(680px, 92vw);
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  box-shadow: -15px 0 45px rgba(0, 0, 0, 0.5);
  z-index: 250;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chapter-drawer.open {
  transform: translateX(0);
}

.chapter-drawer.fullscreen {
  width: 100vw;
}

.drawer-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(17, 24, 39, 0.95);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.drawer-breadcrumbs {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}

.drawer-title-group h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
}

.drawer-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: var(--transition);
}

.icon-btn:hover {
  background: #1e293b;
  color: #fff;
  border-color: var(--border-focus);
}

.drawer-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 130, 246, 0.4) rgba(15, 23, 42, 0.6);
}

.drawer-body::-webkit-scrollbar {
  width: 7px;
}

.drawer-body::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 99px;
}

.drawer-body::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.35);
  border-radius: 99px;
}

.drawer-body::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.7);
}

/* Secțiunea Conexiuni Interne din Drawer */
.drawer-connections-panel {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
}

.conn-panel-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.conn-flow-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.conn-flow-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid #60a5fa;
  cursor: pointer;
  transition: var(--transition);
}

.conn-flow-item:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(2px);
}

.conn-flow-item.incoming {
  border-left-color: #34d399;
}

.conn-tag {
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.conn-reason {
  color: var(--text-muted);
}

/* Conținut Text Tehnic din Carte */
.book-content-wrapper {
  font-size: 0.95rem;
  color: #cbd5e1;
  line-height: 1.7;
}

.book-content-wrapper h4 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin: 1.25rem 0 0.6rem;
  letter-spacing: -0.01em;
}

.book-content-wrapper p {
  margin-bottom: 1rem;
}

.book-content-wrapper ul, .book-content-wrapper ol {
  margin: 0.5rem 0 1.25rem 1.4rem;
}

.book-content-wrapper li {
  margin-bottom: 0.4rem;
}

.book-content-wrapper b {
  color: #fff;
}

.note-box {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-left: 4px solid var(--c-desen);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  margin: 1.2rem 0;
  font-size: 0.88rem;
  color: #bfdbfe;
}

.formula-box {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  margin: 1.2rem 0;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: #38bdf8;
  line-height: 1.6;
}

.tech-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin: 1rem 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.tech-table th, .tech-table td {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border-subtle);
  text-align: left;
}

.tech-table th {
  background: #1e293b;
  color: #fff;
  font-weight: 700;
}

.tech-table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

/* Calculator Interactiv Integrat în Drawer */
.mini-calc-widget {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(15, 23, 42, 0.8));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  margin-top: 1rem;
}

.mini-calc-widget h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #34d399;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.calc-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.calc-field label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  font-family: var(--font-mono);
}

.calc-field input {
  width: 100%;
  background: #0f172a;
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: var(--font-mono);
  outline: none;
  transition: var(--transition);
}

.calc-field input:focus {
  border-color: var(--c-mu);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

.calc-results {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-around;
  text-align: center;
  border: 1px dashed rgba(16, 185, 129, 0.25);
}

.res-item .res-lbl {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.res-item .res-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: #34d399;
  font-family: var(--font-mono);
}

/* Bara plutitoare de Tur Ghidat (Slide cu slide) */
.guided-tour-bar {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  width: min(850px, 94vw);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  z-index: 150;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.guided-tour-bar.show {
  transform: translateX(-50%) translateY(0);
}

.tour-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.tour-step-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: #34d399;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(16, 185, 129, 0.12);
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.tour-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.25rem;
}

.tour-sub {
  font-size: 0.8rem;
  color: #38bdf8;
  margin-bottom: 0.5rem;
}

.tour-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.tour-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.85rem;
}

.tour-progress-dots {
  display: flex;
  gap: 0.4rem;
}

.tour-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transition: var(--transition);
}

.tour-dot.active {
  background: var(--c-mu);
  width: 20px;
  border-radius: 99px;
}

.tour-nav-btns {
  display: flex;
  gap: 0.5rem;
}

/* Tooltip plutitor pentru relații între taburi */
#flow-tooltip {
  position: fixed;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid #60a5fa;
  color: #f1f5f9;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  pointer-events: none;
  z-index: 300;
  max-width: 280px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  display: none;
}


/* Banner Formulă Matematică Cauză-Efect */
.formula-banner-wrap {
  max-width: 1560px;
  margin: 0.5rem auto 0;
  padding: 0 1rem;
}

.formula-banner {
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.formula-banner::-webkit-scrollbar {
  display: none;
}

.formula-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #60a5fa;
  white-space: nowrap;
  font-family: var(--font-mono);
}

.formula-chain {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  white-space: nowrap;
}

.f-node {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  color: #e2e8f0;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.f-node:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: #60a5fa;
  color: #fff;
  transform: translateY(-1px);
}

.f-node.highlight {
  background: rgba(234, 179, 8, 0.15);
  border-color: rgba(234, 179, 8, 0.4);
  color: #fef08a;
}

.f-op {
  color: var(--text-dim);
  font-weight: 700;
}

.f-arrow {
  color: #60a5fa;
  font-weight: 800;
  font-size: 0.85rem;
}

/* Diagrame Tehnice din Carte în Drawer */
.tech-diagram-card {
  margin: 1.1rem 0;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: var(--transition);
}

.tech-diagram-card:hover {
  border-color: rgba(96, 165, 250, 0.4);
}

.diagram-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d131f;
  padding: 0.85rem;
}

.tech-diagram-img {
  max-width: 100%;
  max-height: 280px;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  filter: contrast(1.05);
}

.diagram-caption {
  padding: 0.55rem 0.9rem;
  font-size: 0.74rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  background: rgba(10, 14, 23, 0.75);
  font-family: var(--font-mono);
  line-height: 1.45;
}

.diagram-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1rem 0;
}

@media (max-width: 768px) {
  .diagram-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Responsivitate */
@media (max-width: 1080px) {
  .matrix-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .matrix-grid {
    grid-template-columns: 1fr;
  }
  .header-actions {
    display: none;
  }
  .outcome-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* ==========================================================================
   Harta Gândirii Tehnologice & Book Reference Card Styling
   ========================================================================== */

/* Mindset / Cognitive Summary in Drawer */
.mindset-summary-box {
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.5rem;
}

.mindset-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #60a5fa;
  margin-bottom: 0.6rem;
}

.mindset-lead {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #f1f5f9;
  margin: 0;
}

/* Book Reference Card (High-Converting Referral) */
.book-reference-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 14px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 20px rgba(245, 158, 11, 0.1);
  position: relative;
  overflow: hidden;
}

.book-reference-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #f59e0b, #d97706);
}

.book-ref-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.book-ref-icon {
  font-size: 2rem;
  line-height: 1;
  background: rgba(245, 158, 11, 0.15);
  padding: 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.book-ref-meta {
  flex: 1;
}

.book-ref-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #f59e0b;
  font-weight: 700;
  display: block;
}

.book-ref-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin: 0.2rem 0 0.35rem;
  line-height: 1.3;
}

.book-ref-badge {
  display: inline-block;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 6px;
}

.book-ref-desc {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.55;
  margin: 0.6rem 0 1.25rem;
}

.book-ref-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.mindset-takeaways {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.mindset-takeaways li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.mindset-takeaways li::before {
  content: "⚡";
  position: absolute;
  left: 0;
  top: 0.1rem;
  font-size: 0.85rem;
  color: #f59e0b;
}
