/* DTDesk CRM — in-app user guide (beginner-friendly + 3D flows) */
.dt-docs-wrap {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
@media (max-width: 960px) {
  .dt-docs-wrap { grid-template-columns: 1fr; }
  .dt-docs-toc { position: static !important; max-height: none !important; }
}
.dt-docs-toc {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 110px);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--dt-border-2, #e2e8f0);
  border-radius: 12px;
  padding: 14px 12px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}
.dt-docs-toc h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin: 0 0 10px 8px;
}
.dt-docs-toc a {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: #334155;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.dt-docs-toc a:hover,
.dt-docs-toc a.is-active {
  background: #eff6ff;
  color: #1d4ed8;
}
.dt-docs-toc .sub { padding-left: 18px; font-size: 12px; }
.dt-docs-body { min-width: 0; }

/* Hero / quick start */
.dt-doc-hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #4f46e5 55%, #7c3aed 100%);
  border-radius: 16px;
  padding: 28px 28px 24px;
  color: #fff;
  margin-bottom: 20px;
  box-shadow: 0 20px 50px rgba(30, 58, 138, 0.35);
  position: relative;
  overflow: hidden;
}
.dt-doc-hero::before {
  content: '';
  position: absolute;
  inset: -40% -20% auto auto;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%);
  animation: dtHeroGlow 6s ease-in-out infinite;
}
@keyframes dtHeroGlow {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: .8; }
  50% { transform: translate(-20px, 10px) scale(1.1); opacity: 1; }
}
.dt-doc-hero h2 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 800;
  position: relative;
}
.dt-doc-hero p {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255,255,255,.92);
  max-width: 640px;
  position: relative;
}
.dt-doc-hero-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  position: relative;
}
.dt-doc-hero-card {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
  transform-style: preserve-3d;
  transition: transform .35s ease, box-shadow .35s ease;
}
.dt-doc-hero-card:hover {
  transform: translateY(-4px) rotateX(6deg);
  box-shadow: 0 16px 32px rgba(0,0,0,.2);
}
.dt-doc-hero-card i {
  font-size: 22px;
  margin-bottom: 8px;
  display: block;
  color: #a5f3fc;
}
.dt-doc-hero-card strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}
.dt-doc-hero-card span {
  font-size: 11px;
  opacity: .85;
  line-height: 1.4;
}

.dt-doc-section {
  background: #fff;
  border: 1px solid var(--dt-border-2, #e2e8f0);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 20px;
  scroll-margin-top: 100px;
}
.dt-doc-section h2 {
  margin: 0 0 6px;
  font-size: 22px;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dt-doc-section h2 i { color: #2563eb; font-size: 18px; }
.dt-doc-section h3 { margin: 18px 0 8px; font-size: 16px; color: #1e293b; }
.dt-doc-lead { color: #64748b; font-size: 14px; line-height: 1.65; margin-bottom: 14px; }
.dt-doc-simple {
  font-size: 15px;
  color: #334155;
  line-height: 1.7;
  margin-bottom: 16px;
}

/* 3D animated flow pipeline */
.dt-flow3d {
  margin: 20px 0;
  padding: 20px 18px 22px;
  border-radius: 16px;
  background: linear-gradient(160deg, #f0f9ff 0%, #eef2ff 45%, #faf5ff 100%);
  border: 1px solid #c7d2fe;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 12px 40px rgba(79, 70, 229, .08);
  perspective: 1400px;
}
.dt-flow3d-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.dt-flow3d-head h3 {
  margin: 0;
  font-size: 17px;
  color: #1e1b4b;
}
.dt-flow3d-head p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #6366f1;
}
.dt-flow3d-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dt-flow3d-btn {
  border: none;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, .35);
  transition: transform .2s, box-shadow .2s;
}
.dt-flow3d-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(37, 99, 235, .45); }
.dt-flow3d-progress {
  font-size: 12px;
  font-weight: 600;
  color: #4338ca;
  background: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #c7d2fe;
}
.dt-flow3d-track {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 12px 4px 20px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.dt-flow3d-step {
  flex: 0 0 auto;
  width: min(220px, 78vw);
  scroll-snap-align: center;
  position: relative;
  padding: 0 8px;
  transform-style: preserve-3d;
}
.dt-flow3d-step::after {
  content: '';
  position: absolute;
  top: 52px;
  right: -4px;
  width: 24px;
  height: 3px;
  background: linear-gradient(90deg, #818cf8, transparent);
  border-radius: 2px;
  opacity: .5;
}
.dt-flow3d-step:last-child::after { display: none; }
.dt-flow3d-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px 14px 14px;
  border: 2px solid #e0e7ff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
  transform: rotateX(8deg) translateZ(0);
  transition: transform .45s cubic-bezier(.22, 1, .36, 1), box-shadow .45s, border-color .45s, opacity .45s;
  opacity: .72;
  min-height: 168px;
  position: relative;
}
.dt-flow3d-step.is-active .dt-flow3d-card {
  transform: rotateX(0deg) translateZ(48px) scale(1.04);
  border-color: #6366f1;
  box-shadow: 0 24px 48px rgba(99, 102, 241, .28), 0 0 0 4px rgba(99, 102, 241, .12);
  opacity: 1;
  animation: dtFlowFloat 3s ease-in-out infinite;
}
.dt-flow3d-step.is-done .dt-flow3d-card {
  opacity: .9;
  border-color: #86efac;
  transform: rotateX(4deg) translateZ(12px);
}
@keyframes dtFlowFloat {
  0%, 100% { transform: rotateX(0deg) translateZ(48px) scale(1.04) translateY(0); }
  50% { transform: rotateX(0deg) translateZ(52px) scale(1.04) translateY(-6px); }
}
.dt-flow3d-num {
  position: absolute;
  top: -10px;
  left: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(79, 70, 229, .4);
}
.dt-flow3d-step.is-done .dt-flow3d-num { background: linear-gradient(135deg, #16a34a, #22c55e); }
.dt-flow3d-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(145deg, #eff6ff, #e0e7ff);
  display: grid;
  place-items: center;
  margin: 8px 0 10px;
  font-size: 20px;
  color: #4338ca;
  box-shadow: 0 6px 16px rgba(67, 56, 202, .15);
}
.dt-flow3d-step.is-active .dt-flow3d-icon {
  animation: dtIconPulse 2s ease-in-out infinite;
}
@keyframes dtIconPulse {
  0%, 100% { box-shadow: 0 6px 16px rgba(67, 56, 202, .15); }
  50% { box-shadow: 0 8px 24px rgba(99, 102, 241, .45); }
}
.dt-flow3d-card h4 {
  margin: 0 0 6px;
  font-size: 14px;
  color: #0f172a;
  line-height: 1.35;
}
.dt-flow3d-card p {
  margin: 0 0 8px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}
.dt-flow3d-where {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}
.dt-flow3d-step.is-active .dt-flow3d-where {
  background: #eef2ff;
  color: #4338ca;
}
.dt-flow3d-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}
.dt-flow3d-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: #c7d2fe;
  cursor: pointer;
  transition: transform .2s, background .2s;
}
.dt-flow3d-dot.is-active {
  background: #4f46e5;
  transform: scale(1.35);
}
.dt-flow3d-dot.is-done { background: #86efac; }

/* Moving particle along flow */
.dt-flow3d-particle {
  height: 4px;
  margin: 0 20px 4px;
  background: #e0e7ff;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.dt-flow3d-particle::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 28%;
  background: linear-gradient(90deg, transparent, #6366f1, #a78bfa, transparent);
  border-radius: 999px;
  animation: dtParticleRun 2.8s ease-in-out infinite;
}
@keyframes dtParticleRun {
  0% { left: -30%; }
  100% { left: 100%; }
}

/* CRM layout visual mock */
.dt-ui-mock {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid #1e293b;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .2);
  margin: 18px 0;
  transform: perspective(900px) rotateX(4deg);
  transform-style: preserve-3d;
  transition: transform .4s ease;
}
.dt-ui-mock:hover { transform: perspective(900px) rotateX(0deg); }
.dt-ui-mock-side {
  background: linear-gradient(180deg, #0f172a, #1e293b);
  padding: 14px 10px;
  color: #94a3b8;
  font-size: 10px;
}
.dt-ui-mock-side .lbl {
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 9px;
  color: #64748b;
  margin: 10px 0 6px 4px;
}
.dt-ui-mock-side .item {
  padding: 6px 8px;
  border-radius: 6px;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dt-ui-mock-side .item.hot {
  background: rgba(34, 211, 238, .15);
  color: #22d3ee;
  animation: dtSidePulse 2s ease-in-out infinite;
}
@keyframes dtSidePulse {
  0%, 100% { box-shadow: inset 0 0 0 0 rgba(34, 211, 238, 0); }
  50% { box-shadow: inset 0 0 0 1px rgba(34, 211, 238, .5); }
}
.dt-ui-mock-main { background: #f8fafc; }
.dt-ui-mock-top {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dt-ui-mock-top .pill {
  font-size: 10px;
  padding: 5px 10px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
}
.dt-ui-mock-top .pill.hot {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
  animation: dtTopGlow 2.5s ease-in-out infinite;
}
@keyframes dtTopGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
  50% { box-shadow: 0 0 0 4px rgba(37, 99, 235, .15); }
}
.dt-ui-mock-content {
  padding: 16px;
  min-height: 120px;
}
.dt-ui-mock-content .box {
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  font-size: 12px;
  color: #64748b;
}
.dt-ui-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.dt-ui-legend-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}
.dt-ui-legend-item i {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #eff6ff;
  color: #2563eb;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.dt-ui-legend-item strong { display: block; font-size: 13px; color: #0f172a; }
.dt-ui-legend-item span { font-size: 12px; color: #64748b; line-height: 1.45; }

/* Website → CRM 3D bridge */
.dt-bridge3d {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: stretch;
  margin: 18px 0;
  perspective: 1000px;
}
@media (max-width: 720px) {
  .dt-bridge3d { grid-template-columns: 1fr; }
  .dt-bridge3d-mid { flex-direction: row !important; padding: 12px !important; }
}
.dt-bridge3d-col {
  background: #fff;
  border-radius: 14px;
  border: 2px solid #e2e8f0;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
  transform: translateZ(0);
  transition: transform .4s, box-shadow .4s;
}
.dt-bridge3d-col:hover {
  transform: translateY(-6px) translateZ(20px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, .12);
}
.dt-bridge3d-col h4 {
  margin: 0 0 10px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dt-bridge3d-col ul {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.7;
}
.dt-bridge3d-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 8px;
  color: #6366f1;
  font-size: 22px;
}
.dt-bridge3d-mid .arrow {
  animation: dtBridgeArrow 1.4s ease-in-out infinite;
}
@keyframes dtBridgeArrow {
  0%, 100% { transform: translateX(0); opacity: .5; }
  50% { transform: translateX(8px); opacity: 1; }
}
.dt-bridge3d-mid small {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #818cf8;
}

/* Steps, cards, tips */
.dt-doc-steps {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}
.dt-doc-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  animation: dtDocFadeIn 0.5s ease both;
}
.dt-doc-step:nth-child(2) { animation-delay: 0.08s; }
.dt-doc-step:nth-child(3) { animation-delay: 0.16s; }
.dt-doc-step:nth-child(4) { animation-delay: 0.24s; }
.dt-doc-step:nth-child(5) { animation-delay: 0.32s; }
@keyframes dtDocFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.dt-doc-step-num {
  flex: 0 0 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.dt-doc-step strong { display: block; margin-bottom: 2px; color: #0f172a; }
.dt-doc-step p { margin: 0; font-size: 13px; color: #475569; line-height: 1.55; }
.dt-doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.dt-doc-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  background: #fff;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}
.dt-doc-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}
.dt-doc-card h4 { margin: 0 0 6px; font-size: 14px; color: #0f172a; }
.dt-doc-card h4 a { color: inherit; text-decoration: none; }
.dt-doc-card h4 a:hover { color: #2563eb; }
.dt-doc-card p { margin: 0; font-size: 12px; color: #64748b; line-height: 1.5; }
.dt-doc-card .tag {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
}
.dt-doc-card .plain {
  margin-top: 6px;
  font-size: 11px;
  color: #16a34a;
  font-weight: 600;
}

/* Technical details (collapsed) */
.dt-doc-tech {
  margin-top: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}
.dt-doc-tech summary {
  padding: 12px 14px;
  background: #f8fafc;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dt-doc-tech summary::-webkit-details-marker { display: none; }
.dt-doc-tech summary::before {
  content: '▶';
  font-size: 10px;
  transition: transform .2s;
}
.dt-doc-tech[open] summary::before { transform: rotate(90deg); }
.dt-doc-tech .dt-mermaid { margin: 0; border: none; border-radius: 0; border-top: 1px dashed #e2e8f0; }

.dt-mermaid {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 16px;
  margin: 14px 0;
  overflow-x: auto;
}
.dt-doc-tip {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  font-size: 13px;
  color: #166534;
  line-height: 1.55;
}
.dt-doc-warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}
.dt-doc-kbd {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  font-size: 11px;
  font-family: ui-monospace, monospace;
}
