/* ==========================================================================
   Techpanda CRM - Dashboard Native Application Showcase
   Direct native implementation of CRM-Dashboard (6) codebase
   Format: Two-Column 3D Hero, 4 Floating Milestone Cards, Interactive Workbench
   ========================================================================== */

:root {
  --tpc-orange: #FF5722;
  --tpc-orange-dark: #E64A19;
  --tpc-orange-soft: rgba(255, 87, 34, 0.10);
  --tpc-navy: #0F172A;
  --tpc-navy-soft: rgba(15, 23, 42, 0.06);
  --tpc-blue: #3B82F6;
  --tpc-blue-soft: rgba(59, 130, 246, 0.10);
  --tpc-green: #10B981;
  --tpc-green-soft: rgba(16, 185, 129, 0.10);
  --tpc-amber: #F59E0B;
  --tpc-amber-soft: rgba(245, 158, 11, 0.12);
  --tpc-purple: #8B5CF6;
  --tpc-purple-soft: rgba(139, 92, 246, 0.12);

  --tpc-hero-bg: radial-gradient(ellipse 90% 65% at 20% 30%, rgba(255, 87, 34, 0.08) 0%, rgba(59, 130, 246, 0.04) 45%, var(--bg) 85%);
  --tpc-card-bg: var(--card);
  --tpc-card-border: var(--card-border);
  --tpc-card-shadow: 0 14px 34px -6px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] {
  --tpc-orange-soft: rgba(255, 87, 34, 0.18);
  --tpc-blue-soft: rgba(59, 130, 246, 0.18);
  --tpc-green-soft: rgba(16, 185, 129, 0.18);
  --tpc-hero-bg: radial-gradient(ellipse 90% 65% at 20% 30%, rgba(255, 87, 34, 0.14) 0%, rgba(59, 130, 246, 0.10) 45%, var(--bg) 85%);
  --tpc-card-shadow: 0 18px 40px -6px rgba(0, 0, 0, 0.55);
}

/* ==========================================================================
   1. HERO STAGE (AUTHENTIC TWO-COLUMN 3D ARCHITECTURE)
   ========================================================================== */
.tpc-hero-stage-section {
  position: relative;
  width: 100%;
  padding: clamp(96px, 12vh, 128px) 0 clamp(48px, 6vw, 64px);
  background: var(--tpc-hero-bg);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.tpc-hero-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.3fr;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  position: relative;
  z-index: 2;
  width: 100%;
}

/* --- Left Column: 3D Visual Centerpiece & 4 Floating Milestone Cards --- */
.tpc-hero-visual-stage {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tpc-trajectory-curve {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  max-width: 540px;
  max-height: 420px;
  pointer-events: none;
  z-index: 1;
}

.tpc-trajectory-curve path {
  fill: none;
  stroke: rgba(255, 87, 34, 0.45);
  stroke-width: 2.2;
  stroke-dasharray: 6 6;
  stroke-linecap: round;
}

[data-theme="dark"] .tpc-trajectory-curve path {
  stroke: rgba(255, 87, 34, 0.55);
}

.tpc-center-wrap {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 400px;
  text-align: center;
}

/* 3D Dashboard HUD Card Centerpiece */
.tpc-hud-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 24px 22px;
  box-shadow: 0 20px 48px -10px rgba(15, 23, 42, 0.22);
  position: relative;
  overflow: hidden;
  animation: tpcFloatCenter 5s ease-in-out infinite;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

@keyframes tpcFloatCenter {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.tpc-hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.tpc-hud-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tpc-hud-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #FFFFFF;
  padding: 4px;
  border: 1px solid var(--border);
  object-fit: contain;
}

.tpc-hud-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text);
}

.tpc-live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
}

.tpc-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: tpcPulse 1.8s infinite;
}

@keyframes tpcPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.tpc-hud-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.tpc-hud-stat {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
}

.tpc-hud-stat-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}

.tpc-hud-stat-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}

/* Hand-drawn SVG Sparkline Wave in HUD */
.tpc-hud-wave-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  text-align: left;
}

.tpc-hud-wave-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}

.tpc-character-shadow-pulse {
  width: 250px;
  height: 20px;
  background: radial-gradient(ellipse at center, rgba(15, 23, 42, 0.25) 0%, transparent 75%);
  border-radius: 50%;
  margin: 12px auto 0;
  animation: tpcShadowPulse 5s ease-in-out infinite;
}

[data-theme="dark"] .tpc-character-shadow-pulse {
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.65) 0%, transparent 75%);
}

@keyframes tpcShadowPulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(0.90); opacity: 0.50; }
}

/* 4 Floating Glass Milestone Cards */
.tpc-float-card {
  position: absolute;
  z-index: 5;
  background: var(--tpc-card-bg);
  border: 1px solid var(--tpc-card-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 16px;
  padding: 10px 16px;
  box-shadow: var(--tpc-card-shadow);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: default;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}

.tpc-float-card:hover {
  transform: translateY(-4px) scale(1.03) !important;
  border-color: var(--tpc-orange);
  box-shadow: 0 16px 36px rgba(255, 87, 34, 0.22);
}

.tpc-float-card-1 {
  top: 6%;
  left: -12px;
  animation: tpcFloat1 5.2s ease-in-out infinite;
}

.tpc-float-card-2 {
  top: 8%;
  right: -12px;
  animation: tpcFloat2 4.8s ease-in-out infinite;
}

.tpc-float-card-3 {
  bottom: 8%;
  left: -14px;
  animation: tpcFloat3 5.4s ease-in-out infinite;
}

.tpc-float-card-4 {
  bottom: 6%;
  right: -12px;
  animation: tpcFloat4 5s ease-in-out infinite;
}

@keyframes tpcFloat1 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes tpcFloat2 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes tpcFloat3 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes tpcFloat4 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

.tpc-float-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.tpc-float-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.tpc-float-sub {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.2;
}

/* --- Right Column: Headline, Actions & Value Highlights --- */
.tpc-hero-content-stage {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.tpc-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: var(--tpc-orange-soft);
  border: 1px solid rgba(255, 87, 34, 0.28);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--tpc-orange);
  margin-bottom: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tpc-hero-title {
  font-size: clamp(2.2rem, 3.8vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0 0 16px;
}

.tpc-title-accent {
  color: var(--tpc-orange);
  display: block;
}

.tpc-hero-desc {
  font-size: clamp(1rem, 1.15vw, 1.15rem);
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0 0 24px;
  max-width: 65ch;
}

.tpc-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.tpc-btn-primary {
  height: 48px;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.94rem;
  font-weight: 700;
  border-radius: 999px;
  background: linear-gradient(135deg, #FF5722 0%, #F4511E 100%);
  color: #FFFFFF !important;
  border: none;
  box-shadow: 0 8px 22px rgba(255, 87, 34, 0.38);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.tpc-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(255, 87, 34, 0.48);
}

.tpc-btn-secondary {
  height: 48px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.94rem;
  font-weight: 700;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text) !important;
  border: 1.5px solid var(--border);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  text-decoration: none;
}

.tpc-btn-secondary:hover {
  border-color: var(--tpc-blue);
  color: var(--tpc-blue) !important;
  transform: translateY(-2px);
}

.tpc-btn-outline {
  height: 48px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.94rem;
  font-weight: 700;
  border-radius: 999px;
  background: transparent;
  color: var(--tpc-green) !important;
  border: 1.5px solid rgba(16, 185, 129, 0.45);
  transition: all 0.2s ease;
  text-decoration: none;
}

.tpc-btn-outline:hover {
  background: var(--tpc-green);
  color: #FFFFFF !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

/* Module Fast-Track Badges */
.tpc-hero-domains {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
}

.tpc-domains-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 4px;
}

.tpc-domain-chip {
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s ease;
}

.tpc-domain-chip:hover {
  border-color: var(--tpc-orange);
  color: var(--tpc-orange);
  transform: translateY(-1px);
}

/* Metrics Row */
.tpc-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 100%;
}

.tpc-metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.tpc-metric-card:hover {
  transform: translateY(-2px);
  border-color: var(--tpc-orange);
}

.tpc-metric-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}

.tpc-metric-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 3px;
}

/* Responsive Hero */
@media (max-width: 991px) {
  .tpc-hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .tpc-hero-visual-stage {
    order: 1;
    min-height: 400px;
    max-width: 500px;
    margin: 0 auto;
  }
  .tpc-hero-content-stage {
    order: 2;
    align-items: center;
    text-align: center;
  }
  .tpc-hero-desc {
    text-align: center;
  }
  .tpc-hero-actions,
  .tpc-hero-domains {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .tpc-metrics-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .tpc-center-wrap {
    max-width: 320px;
  }
  .tpc-hud-card {
    padding: 16px 14px;
    border-radius: 18px;
  }
  .tpc-float-card {
    padding: 5px 9px;
    border-radius: 10px;
    gap: 8px;
  }
  .tpc-float-card-1 {
    top: -14px;
    left: -4px;
  }
  .tpc-float-card-2 {
    top: -14px;
    right: -4px;
  }
  .tpc-float-card-3 {
    bottom: -12px;
    left: -6px;
  }
  .tpc-float-card-4 {
    bottom: -12px;
    right: -6px;
  }
  .tpc-float-title {
    font-size: 11px;
  }
  .tpc-float-sub {
    display: none;
  }
  .tpc-float-icon {
    width: 26px;
    height: 26px;
    font-size: 13px;
    border-radius: 8px;
  }
}

/* ==========================================================================
   2. FUNCTIONAL MODULE EXPLORER
   ========================================================================== */
.tpc-category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 24px;
}

@media (max-width: 1024px) {
  .tpc-category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 580px) {
  .tpc-category-grid {
    grid-template-columns: 1fr;
  }
}

.tpc-category-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.tpc-category-card:hover {
  transform: translateY(-4px);
  border-color: var(--tpc-orange);
  box-shadow: 0 14px 30px rgba(255, 87, 34, 0.12);
}

.tpc-cat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}

.tpc-cat-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.tpc-cat-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
  flex-grow: 1;
}

.tpc-cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.tpc-cat-chip {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.tpc-cat-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--tpc-orange);
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: auto;
}

/* ==========================================================================
   3. INTERACTIVE MULTI-MODULE WORKBENCH (TABBED NATIVE UI)
   ========================================================================== */
.tpc-portal-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}

.tpc-portal-tab {
  padding: 10px 20px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tpc-portal-tab:hover {
  color: var(--text);
  border-color: var(--tpc-orange);
}

.tpc-portal-tab.is-active {
  background: var(--tpc-orange);
  color: #FFFFFF;
  border-color: var(--tpc-orange);
  box-shadow: 0 4px 14px rgba(255, 87, 34, 0.35);
}

.tpc-portal-view {
  display: none;
  animation: tpcFadeIn 0.3s ease forwards;
}

.tpc-portal-view.is-active {
  display: block;
}

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

.tpc-portal-card-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .tpc-portal-card-layout {
    grid-template-columns: 1fr;
  }
}

.tpc-app-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px;
  box-shadow: var(--tpc-card-shadow);
}

.tpc-app-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.tpc-app-panel-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Branch & Heatmap Tables */
.tpc-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.tpc-data-table th {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1.5px solid var(--border);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.tpc-data-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.tpc-heat-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.78rem;
}

.tpc-heat-high { background: rgba(16, 185, 129, 0.15); color: #10B981; }
.tpc-heat-med { background: rgba(59, 130, 246, 0.15); color: #3B82F6; }
.tpc-heat-low { background: rgba(245, 158, 11, 0.15); color: #F59E0B; }

/* Flowchart / Architecture Nodes */
.tpc-agent-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
}

@media (max-width: 1024px) {
  .tpc-agent-flow {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .tpc-agent-flow {
    grid-template-columns: 1fr;
  }
}

.tpc-agent-node {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.tpc-agent-node:hover {
  transform: translateY(-4px);
  border-color: var(--tpc-orange);
}

.tpc-agent-num {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--tpc-orange);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.tpc-agent-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.tpc-agent-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.tpc-agent-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  align-self: flex-start;
  margin-top: auto;
}
