/* ==========================================================================
   APP SHELL & MOBILE-FIRST COMPONENTS — CHUẨN Q1 VISUAL ATLAS
   Phục vụ màn hình Home (HOME-01 -> HOME-03, BRAND-01, BRAND-02, A-01 -> A-04)
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: #060A14;
  background-image: radial-gradient(circle at 50% 20%, rgba(45, 123, 255, 0.08) 0%, transparent 60%),
                    radial-gradient(circle at 80% 80%, rgba(0, 229, 255, 0.05) 0%, transparent 50%);
  color: var(--text-main);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100%;
  padding: 0;
  margin: 0;
  overflow-x: hidden;
}

/* Khung Desktop bao ngoài */
.desktop-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* Thanh điều khiển trên đỉnh giả lập - ẩn để tràn viền tự nhiên */
.top-bar-controls {
  display: none;
}

.device-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  font-weight: 500;
}

.device-badge .dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-success);
  border-radius: 50%;
  box-shadow: var(--glow-green);
}

.mode-switch-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--color-cyan);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.mode-switch-btn:hover {
  background: rgba(0, 229, 255, 0.1);
  border-color: var(--color-cyan);
}

/* ==========================================================================
   KHUNG VIEWPORT DÍNH SÁT MẶT DƯỚI MÀN HÌNH (CHUẨN THỰC CHIẾN BO-01)
   ========================================================================== */
.mobile-viewport {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  background-color: var(--bg-main);
  border-radius: 0;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 229, 255, 0.08);
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.07);
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
}

/* Status Bar & Dynamic Island */
.status-bar {
  height: 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-white);
  z-index: 20;
  flex-shrink: 0;
}

.dynamic-island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 105px;
  height: 26px;
  background-color: #000000;
  border-radius: var(--radius-pill);
  z-index: 21;
}

/* ==========================================================================
   TOP APP BAR (HOME-01: Logo, Brand, Search, Bell, Avatar, Online)
   ========================================================================== */
.top-app-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px 10px 18px;
  background: rgba(6, 10, 20, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transform: translateY(0);
  opacity: 1;
  filter: blur(0px);
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1) 0ms,
              opacity 0.32s ease 0ms,
              filter 0.32s ease 0ms;
  will-change: transform, opacity, filter;
}

.brand-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo-svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.brand-text-col {
  display: flex;
  flex-direction: column;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.2;
}

.brand-dropdown-arrow {
  width: 12px;
  height: 12px;
  fill: var(--text-secondary);
}

.brand-subtext {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.2;
}

.header-actions-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-action-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 4px;
}

.header-action-btn svg {
  width: 18px;
  height: 18px;
  stroke: var(--text-secondary);
  stroke-width: 2;
  fill: none;
}

.badge-notification {
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: var(--color-danger);
  color: var(--color-white);
  font-size: 9px;
  font-weight: bold;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--bg-main);
}

.user-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--color-cyan);
  overflow: hidden;
  box-shadow: var(--glow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #153B7A;
}

.user-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.online-pill-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(16, 217, 129, 0.12);
  border: 1px solid rgba(16, 217, 129, 0.4);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 600;
  color: var(--color-success);
}

.online-pill-badge .dot {
  width: 6px;
  height: 6px;
  background-color: var(--color-success);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--color-success);
}

/* ==========================================================================
   MASTER 3-VIEWS SWITCHER (HOME-02: Tổng quan / Đang vận hành / Cải tiến)
   ========================================================================== */
.view-switcher-pill {
  position: absolute;
  top: 56px;
  left: 16px;
  right: 16px;
  z-index: 99;
  display: flex;
  background: rgba(10, 20, 38, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 4px;
  transform: translateY(0) scale(1);
  opacity: 1;
  filter: blur(0px);
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1) 35ms,
              opacity 0.32s ease 35ms,
              filter 0.32s ease 35ms;
  will-change: transform, opacity, filter;
}

.view-switcher-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 4px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.view-switcher-btn.active {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: var(--glow-primary);
}

/* ==========================================================================
   SCROLLABLE CONTENT AREA
   ========================================================================== */
.screen-scroll-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 64px 16px 54px 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.screen-scroll-container.home-active {
  padding-top: 114px;
}
.screen-scroll-container::-webkit-scrollbar {
  display: none;
}

.view-panel {
  display: none;
  flex-direction: column;
  gap: 12px;
  animation: fadeIn 0.25s ease-out;
}
.view-panel.active {
  display: flex;
}

.tab-screen {
  display: none;
  flex-direction: column;
  gap: 12px;
  animation: fadeIn 0.25s ease-out;
}
.tab-screen.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   CARD STYLES (BRAND-01, HOME-01, A-01 -> A-04)
   ========================================================================== */
/* ==========================================================================
   CARD STYLES (BRAND-01, HOME-01, A-01 -> A-04) — CYBER-LUXURY 3D DEPTH
   ========================================================================== */
.atlas-card {
  background: linear-gradient(180deg, rgba(16, 28, 52, 0.78) 0%, rgba(9, 17, 34, 0.9) 100%);
  border: 1px solid rgba(45, 123, 255, 0.22);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 10px 30px -4px rgba(0, 0, 0, 0.65), 0 0 15px rgba(45, 123, 255, 0.08);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease,
              box-shadow 0.25s ease;
  cursor: pointer;
}

/* Specular Top Rim Highlight */
.atlas-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  pointer-events: none;
}

/* Touch / Hover Light Flare Sweep */
.atlas-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, transparent 40%, rgba(0, 229, 255, 0.08) 50%, transparent 60%);
  transform: translateX(-100%) rotate(25deg);
  pointer-events: none;
  transition: transform 0.6s ease;
}

.atlas-card:hover {
  border-color: rgba(0, 229, 255, 0.45);
  box-shadow: 0 14px 40px -4px rgba(0, 0, 0, 0.75), 0 0 24px rgba(0, 229, 255, 0.22);
  transform: translateY(-2.5px) scale(1.008);
}

.atlas-card:hover::after {
  transform: translateX(100%) rotate(25deg);
}

.atlas-card:active {
  transform: scale(0.985);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

/* Intro Cascading Reveal Classes for Home Cards */
.intro-card-1 { animation: introCardCascade 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both; }
.intro-card-2 { animation: introCardCascade 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both; }
.intro-card-3 { animation: introCardCascade 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.18s both; }
.intro-card-4 { animation: introCardCascade 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.24s both; }
.intro-card-5 { animation: introCardCascade 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.30s both; }
.intro-card-6 { animation: introCardCascade 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.36s both; }
.intro-card-7 { animation: introCardCascade 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.42s both; }

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.card-title-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-chevron-link {
  font-size: 11px;
  color: var(--color-cyan);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.atlas-card:hover .card-chevron-link {
  color: #38BDF8;
  transform: translateX(2px);
}

/* 1. HERO CARD: PROJECT PULSE & ORBITAL RADAR GAUGE */
.project-pulse-card {
  background: radial-gradient(circle at 50% 20%, rgba(26, 68, 138, 0.45) 0%, rgba(13, 27, 52, 0.88) 55%, rgba(6, 12, 24, 0.96) 100%) !important;
  border: 1px solid rgba(0, 229, 255, 0.32) !important;
  border-radius: 18px !important;
  padding: 12px 10px !important;
  box-shadow: 0 12px 36px -4px rgba(0, 0, 0, 0.7), 0 0 28px rgba(0, 229, 255, 0.16) !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 4px !important;
  position: relative !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.pulse-info-left {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  text-align: left !important;
  gap: 2px !important;
  flex: 1 1 100px !important;
  max-width: 115px !important;
  min-width: 90px !important;
}

.pulse-caption {
  font-size: 9px !important;
  font-weight: 700 !important;
  color: #7E95B5 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
}

.pulse-p01-title {
  font-size: 24px !important;
  font-weight: 800 !important;
  color: #FFFFFF !important;
  line-height: 1.1 !important;
  letter-spacing: -0.5px !important;
  margin: 1px 0 !important;
}

.pulse-p01-sub {
  font-size: 10.5px !important;
  color: #CBD5E1 !important;
  margin-bottom: 4px !important;
  white-space: nowrap !important;
}

.badge-optimizing {
  align-self: flex-start !important;
  background: rgba(6, 78, 59, 0.55) !important;
  border: 1px solid rgba(16, 217, 129, 0.5) !important;
  color: #34D399 !important;
  padding: 2.5px 8px !important;
  border-radius: 9999px !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
  box-shadow: 0 0 8px rgba(16, 217, 129, 0.25) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.pulse-bottom-notes {
  margin-top: 6px !important;
  font-size: 9px !important;
  color: #94A3B8 !important;
  line-height: 1.3 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  text-align: left !important;
}

/* ==========================================================================
   ROTATING MULTI-SECTOR ORBITAL RADAR GAUGE (CẤU TRÚC GỌN THEO ẢNH)
   ========================================================================== */
.pulse-gauge-center {
  position: relative !important;
  width: 136px !important;
  height: 136px !important;
  flex: 0 0 136px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  user-select: none !important;
  margin: 0 auto !important;
}

/* Vòng hạt nét đứt xoay chậm ngược chiều */
.orbit-dashed-ring {
  position: absolute;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  border: 1px dashed rgba(0, 229, 255, 0.22);
  animation: orbitDashed 25s linear infinite;
  pointer-events: none;
  z-index: 1;
}

/* Chùm sáng quét Conic xoay 360 độ liên tục quanh vòng tròn */
.orbit-sweep-beam {
  position: absolute;
  width: 134px;
  height: 134px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    transparent 260deg,
    rgba(16, 217, 129, 0.2) 300deg,
    rgba(0, 229, 255, 0.4) 340deg,
    #00E5FF 360deg
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  animation: orbitSweep 6s linear infinite;
  filter: drop-shadow(0 0 6px #00E5FF);
  pointer-events: none;
  z-index: 2;
}

/* Toàn bộ SVG Radar Dial & Lõi Cầu Chuẩn media_1789482819922.png */
.orbit-gauge-svg {
  position: absolute;
  width: 134px;
  height: 134px;
  z-index: 3;
}

/* Tương tác khi hover/chạm vào các cung */
.gauge-sector-action {
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
  transform-origin: center center;
}

.gauge-sector-action:hover {
  filter: brightness(1.25) drop-shadow(0 0 6px rgba(0, 229, 255, 0.6));
}

/* Equalizer nhấp nháy trong lõi cầu 3D */
.svg-eq-1 { animation: barEqualizer1 1.2s ease-in-out infinite alternate; transform-origin: bottom; }
.svg-eq-2 { animation: barEqualizer2 0.9s ease-in-out infinite alternate; transform-origin: bottom; }
.svg-eq-3 { animation: barEqualizer3 1.4s ease-in-out infinite alternate; transform-origin: bottom; }

/* ==========================================================================
   CỘT STEPPER STAGE BÊN PHẢI (VERTICAL STAGE STEPPER)
   ========================================================================== */
.pulse-stage-stepper {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 2px !important;
  width: 78px !important;
  flex: 0 0 78px !important;
  padding-left: 2px !important;
}

.stepper-title {
  font-size: 9.5px !important;
  font-weight: 600 !important;
  color: #94A3B8 !important;
  margin-bottom: 4px !important;
  text-align: left !important;
  white-space: nowrap !important;
}

.stepper-timeline {
  display: flex;
  flex-direction: column;
  gap: 7px;
  position: relative;
}

/* Đường nối phát quang xanh Cyan giữa M1 và M2A */
.stepper-track-active {
  position: absolute;
  top: 9px;
  left: 8px;
  width: 2px;
  height: 25px;
  background: #00E5FF;
  box-shadow: 0 0 6px #00E5FF;
  z-index: 1;
}

/* Đường nối mờ xám bên dưới M2A */
.stepper-track-inactive {
  position: absolute;
  top: 34px;
  left: 8px;
  bottom: 8px;
  width: 2px;
  background: rgba(255, 255, 255, 0.12);
  z-index: 1;
}

.stage-step-item {
  display: flex;
  align-items: center;
  gap: 7px;
  position: relative;
  z-index: 2;
}

.stage-node-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stage-node-icon svg {
  width: 11px;
  height: 11px;
}

/* Node M1 Xanh lá */
.stage-node-icon.check-green {
  background: #10D981;
  box-shadow: 0 0 8px rgba(16, 217, 129, 0.4);
}

/* Node M2A Xanh Cyan phát sáng */
.stage-node-icon.active-cyan {
  background: #38BDF8;
  border: 1.5px solid #00E5FF;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.7);
  animation: activeNodePulse 2.2s infinite;
}

/* Node VERIFY & DONE Mờ Tối */
.stage-node-icon.pending-dark {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.stage-label-group {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.stage-code {
  font-size: 10.5px;
  font-weight: 700;
  color: #FFFFFF;
}

.stage-step-item.pending .stage-code {
  color: #64748B;
}

.stage-name {
  font-size: 9px;
  color: #94A3B8;
}

.stage-step-item.pending .stage-name {
  color: #475569;
}

.stage-step-item.active .stage-code {
  color: #38BDF8;
}
.stage-step-item.active .stage-name {
  color: #FFFFFF;
  font-weight: 600;
}

/* ==========================================================================
   2. CARD: SỨC KHỎE DỰ ÁN (A-01 METRIC TILES)
   ========================================================================== */
.health-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.health-stat-tile {
  background: linear-gradient(180deg, rgba(20, 34, 60, 0.7) 0%, rgba(12, 20, 38, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 4px 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.health-stat-tile:hover {
  transform: translateY(-2.5px);
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.stat-icon-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.stat-icon-circle svg {
  width: 14px;
  height: 14px;
}

.stat-icon-circle.bg-blue { background: rgba(56, 189, 248, 0.15); border: 1px solid rgba(56, 189, 248, 0.35); }
.stat-icon-circle.bg-coral { background: rgba(248, 113, 113, 0.15); border: 1px solid rgba(248, 113, 113, 0.35); }
.stat-icon-circle.bg-crimson { background: rgba(244, 63, 94, 0.15); border: 1px solid rgba(244, 63, 94, 0.35); }
.stat-icon-circle.bg-amber { background: rgba(251, 191, 36, 0.15); border: 1px solid rgba(251, 191, 36, 0.35); }

.health-num {
  font-size: 19px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1;
  letter-spacing: -0.5px;
}

.health-lbl {
  font-size: 9.5px;
  color: #8FA2BF;
  line-height: 1.1;
  white-space: nowrap;
}

/* ==========================================================================
   3. CARD: TOOL ĐANG LÀM GÌ CHO DỰ ÁN? (3D ROBOT MASCOT)
   ========================================================================== */
.tool-working-body {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.robot-mascot-box-3d {
  width: 74px;
  height: 74px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
  transition: transform 0.3s ease;
}

.atlas-card:hover .robot-mascot-box-3d {
  transform: scale(1.05) rotate(2deg);
}

.robot-3d-svg {
  width: 74px;
  height: 74px;
}

.tool-working-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.tool-working-headline {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 2px;
}

.tool-working-bullet {
  font-size: 10.5px;
  color: #CBD5E1;
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1.3;
}

.check-svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.tool-chevron-right {
  font-size: 16px;
  color: #38BDF8;
  font-weight: 700;
  margin-left: 4px;
  transition: transform 0.2s ease;
}

.atlas-card:hover .tool-chevron-right {
  transform: translateX(3px);
}

/* ==========================================================================
   4. CARD: HOẠT ĐỘNG HIỆN TẠI (LIVE TICKER)
   ========================================================================== */
.current-activity-body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.activity-doc-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.3) 0%, rgba(14, 165, 233, 0.15) 100%);
  border: 1px solid rgba(56, 189, 248, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.activity-doc-icon svg {
  width: 20px;
  height: 20px;
}

.activity-info-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.activity-breadcrumbs {
  font-size: 10px;
  color: #64748B;
  font-weight: 500;
}

.activity-headline {
  font-size: 12.5px;
  font-weight: 700;
  color: #FFFFFF;
}

.activity-subtext {
  font-size: 11px;
  color: #8FA2BF;
  line-height: 1.35;
}

.activity-badges-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  flex-wrap: wrap;
}

.act-badge {
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.act-badge.blue-glow {
  background: rgba(37, 99, 235, 0.25);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38BDF8;
}

.act-badge.dark-trans {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94A3B8;
}

.act-time {
  font-size: 9.5px;
  color: #64748B;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
}

/* ==========================================================================
   5. CARD: DỮ LIỆU & LOGIC (4 FROSTED COLOR TILES & WARNING STRIP)
   ========================================================================== */
.data-logic-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.data-tile {
  border-radius: 12px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.data-tile:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
}

.data-icon-wrap {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.data-icon-wrap svg {
  width: 16px;
  height: 16px;
}

.data-num {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
  color: #FFFFFF;
}

.data-tile-purple {
  background: linear-gradient(180deg, rgba(88, 28, 135, 0.35) 0%, rgba(46, 16, 101, 0.5) 100%);
  border: 1px solid rgba(192, 132, 252, 0.35);
}
.data-tile-purple .data-title { color: #E9D5FF; font-weight: 700; font-size: 10.5px; }
.data-tile-purple .data-desc { color: #C084FC; font-size: 8.5px; }

.data-tile-orange {
  background: linear-gradient(180deg, rgba(154, 52, 18, 0.35) 0%, rgba(92, 30, 10, 0.5) 100%);
  border: 1px solid rgba(251, 146, 60, 0.35);
}
.data-tile-orange .data-title { color: #FED7AA; font-weight: 700; font-size: 10.5px; }
.data-tile-orange .data-desc { color: #FB923C; font-size: 8.5px; }

.data-tile-teal {
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.35) 0%, rgba(19, 78, 74, 0.5) 100%);
  border: 1px solid rgba(45, 212, 191, 0.35);
}
.data-tile-teal .data-title { color: #CCFBF1; font-weight: 700; font-size: 10.5px; }
.data-tile-teal .data-desc { color: #2DD4BF; font-size: 8.5px; }

.data-tile-cyan {
  background: linear-gradient(180deg, rgba(29, 78, 216, 0.35) 0%, rgba(30, 58, 138, 0.5) 100%);
  border: 1px solid rgba(96, 165, 250, 0.35);
}
.data-tile-cyan .data-title { color: #DBEAFE; font-weight: 700; font-size: 10.5px; }
.data-tile-cyan .data-desc { color: #60A5FA; font-size: 8.5px; }

.data-alert-strip {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  border-radius: 10px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: #FDA4AF;
  line-height: 1.35;
}

.data-alert-strip .alert-icon {
  font-size: 12px;
  flex-shrink: 0;
}

.data-alert-strip .alert-text {
  flex: 1;
}

.data-alert-strip .alert-arrow {
  color: #F43F5E;
  font-weight: 700;
  flex-shrink: 0;
}

/* ==========================================================================
   6. CARD: TOOL VỪA HỌC ĐƯỢC
   ========================================================================== */
.learning-card-body {
  display: flex;
  align-items: center;
  gap: 12px;
}

.learning-bulb-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.learning-bulb-icon svg {
  width: 20px;
  height: 20px;
}

.learning-text-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.pattern-badge {
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(192, 132, 252, 0.4);
  color: #C084FC;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 2px;
}

.learning-quote {
  font-size: 12px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.3;
}

.learning-result {
  font-size: 10.5px;
  color: #8FA2BF;
  line-height: 1.3;
}

.candidate-badge-col {
  flex-shrink: 0;
}

.candidate-pill {
  background: rgba(217, 119, 6, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #FBBF24;
  font-size: 8.5px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 8px;
  text-align: center;
  line-height: 1.2;
  display: inline-block;
}

/* ==========================================================================
   7. CARD: CẦN CHỊ XỬ LÝ (1)
   ========================================================================== */
.owner-action-body {
  display: flex;
  align-items: center;
  gap: 12px;
}

.owner-icon-pink {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(251, 113, 133, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.25);
}

.owner-icon-pink svg {
  width: 20px;
  height: 20px;
}

.owner-text-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.owner-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.owner-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #FFFFFF;
}

.owner-level-badge {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #FBBF24;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
}

.owner-desc {
  font-size: 10.5px;
  color: #8FA2BF;
  line-height: 1.35;
}

.btn-owner-action {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  flex-shrink: 0;
}

.btn-owner-action:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.6);
}

.btn-owner-action:active {
  transform: scale(0.96);
}

/* ==========================================================================
   BOTTOM NAVIGATION BAR WITH SAPPHIRE GLOW ON HOME
   ========================================================================== */
.home-active-glow {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.nav-tab-item.active .home-active-glow {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.6), 0 0 3px #38BDF8;
}

.nav-tab-item.active .home-active-glow svg {
  stroke: #FFFFFF !important;
  width: 14px !important;
  height: 14px !important;
}

/* Tab Auto Active Glow (Image 1) */
.nav-tab-item.tab-auto.active {
  color: #00E5FF !important;
}

.nav-tab-item.tab-auto.active svg {
  fill: #00E5FF !important;
  color: #00E5FF !important;
  filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.8));
}

.auto-active-indicator {
  display: none;
}

.nav-tab-item.tab-auto.active .auto-active-indicator {
  display: block;
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 2.5px;
  background: #00E5FF;
  border-radius: 2px;
  box-shadow: 0 0 8px #00E5FF;
}

/* ==========================================================================
   VIEW 2: ĐANG VẬN HÀNH (OPERATING VIEW - HOME-02)
   ========================================================================== */
.stepper-pipeline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  margin-top: 6px;
}

.step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.step-bubble {
  padding: 4px 8px;
  background: #14223A;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 4px;
}

.step-bubble.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
  box-shadow: var(--glow-primary);
}

.stepper-arrow {
  color: var(--text-secondary);
  font-size: 11px;
}

.live-ticker-card {
  background: linear-gradient(135deg, #0F1F3A 0%, #162B4E 100%);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-card);
}

.live-customer-msg {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.live-customer-quote {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-white);
}

.live-customer-time {
  font-size: 11px;
  color: var(--text-secondary);
}

.live-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: rgba(10, 20, 38, 0.6);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 11px;
}

.live-detail-item {
  display: flex;
  gap: 6px;
}
.live-detail-item .lbl { color: var(--text-secondary); }
.live-detail-item .val { color: var(--color-white); font-weight: 600; }
.live-detail-item .val-green { color: var(--color-success); font-weight: 700; }
.live-detail-item .val-cyan { color: var(--color-cyan); font-weight: 700; }

.btn-primary-action {
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: var(--glow-primary);
  transition: all 0.2s ease;
}

.btn-primary-action:hover {
  background: var(--color-primary-hover);
}

.queue-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-top: 6px;
  font-size: 12px;
}

.queue-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-white);
  font-weight: 500;
}

.queue-time-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-danger);
}

/* ==========================================================================
   VIEW 3: CẢI TIẾN (IMPROVEMENT VIEW - HOME-02)
   ========================================================================== */
.improvement-cycle-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
}

.cycle-nodes-container {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cycle-pill-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
}

.cycle-node-detect { background: rgba(139, 92, 246, 0.2); border: 1px solid var(--color-learning); color: var(--color-learning); }
.cycle-node-apply { background: rgba(16, 217, 129, 0.2); border: 1px solid var(--color-success); color: var(--color-success); }
.cycle-node-monitor { background: rgba(239, 68, 68, 0.2); border: 1px solid var(--color-danger); color: var(--color-danger); }
.cycle-node-test { background: rgba(245, 158, 11, 0.2); border: 1px solid var(--color-warning); color: var(--color-warning); }

.candidate-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-top: 6px;
  font-size: 12px;
}

.badge-tag-priority {
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 9px;
  font-weight: 700;
}
.priority-high { background: rgba(239, 68, 68, 0.2); color: var(--color-danger); border: 1px solid rgba(239, 68, 68, 0.4); }
.priority-potential { background: rgba(45, 123, 255, 0.2); color: var(--color-primary); border: 1px solid rgba(45, 123, 255, 0.4); }
.priority-medium { background: rgba(245, 158, 11, 0.2); color: var(--color-warning); border: 1px solid rgba(245, 158, 11, 0.4); }

/* ==========================================================================
   BOTTOM SHEET DRAWER (HOME-03, A-01, A-02, A-03, A-04)
   ========================================================================== */
.bottom-sheet-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(6, 10, 20, 0.75);
  backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.bottom-sheet-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet-drawer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 80%;
  background: #0E1A33;
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  border-top: 1px solid rgba(0, 229, 255, 0.4);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(45, 123, 255, 0.2);
  z-index: 101;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.bottom-sheet-drawer.open {
  display: flex;
  transform: translateY(0);
}

.sheet-handle-bar {
  width: 44px;
  height: 5px;
  background: #334155;
  border-radius: var(--radius-pill);
  margin: 10px auto 4px auto;
  flex-shrink: 0;
}

.sheet-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.sheet-header-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sheet-title-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-white);
  display: flex;
  align-items: center;
  gap: 6px;
}

.sheet-sub-text {
  font-size: 11px;
  color: var(--text-secondary);
}

.sheet-close-btn {
  background: #1A2844;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.sheet-scroll-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: none;
}
.sheet-scroll-body::-webkit-scrollbar {
  display: none;
}

.sheet-footer-actions {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  background: #0A1426;
  flex-shrink: 0;
}

.btn-sheet-primary {
  flex: 2;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-md);
  padding: 11px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.btn-sheet-secondary {
  flex: 1;
  background: #1E293B;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 11px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* ==========================================================================
   BOTTOM NAVIGATION BAR (5 TABS H-01) — DÍNH SÁT MẶT DƯỚI MÀN HÌNH
   ========================================================================== */
.bottom-nav-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  width: 100%;
  height: auto;
  min-height: 46px;
  background: rgba(8, 18, 36, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0, 229, 255, 0.2);
  box-shadow: 0 -2px 14px rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-top: 3px;
  padding-bottom: max(5px, env(safe-area-inset-bottom, 5px));
  transform: translateY(0);
  opacity: 1;
  filter: blur(0px);
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1) 60ms,
              opacity 0.32s ease 60ms,
              filter 0.32s ease 60ms;
  will-change: transform, opacity, filter;
}

/* ==========================================================================
   SMART IMMERSIVE AUTO-HIDE NAVIGATION (APPLE FLUID SCROLL EXPERIENCE)
   - Vuốt lên: Top App Bar ẩn trước (0ms), View Switcher theo sau (30ms),
               Bottom Nav Bar ẩn sau cùng (60ms). Kèm hiệu ứng làm mờ kính (blur 8px).
   - Vuốt xuống: Top App Bar hiện trước (0ms), View Switcher hiện (35ms),
                 Bottom Nav Bar hiện (60ms). Tụ nét mượt mà (blur 0px).
   - Tuyệt đối KHÔNG thay đổi margin để triệt tiêu 100% hiện tượng giật cục
   ========================================================================== */
.top-app-bar.nav-hidden {
  transform: translateY(-100%) !important;
  opacity: 0 !important;
  filter: blur(8px) !important;
  transition: transform 0.36s cubic-bezier(0.16, 1, 0.3, 1) 0ms,
              opacity 0.28s ease 0ms,
              filter 0.28s ease 0ms !important;
  pointer-events: none !important;
}

.view-switcher-pill.nav-hidden {
  transform: translateY(-150%) scale(0.96) !important;
  opacity: 0 !important;
  filter: blur(8px) !important;
  transition: transform 0.36s cubic-bezier(0.16, 1, 0.3, 1) 30ms,
              opacity 0.28s ease 30ms,
              filter 0.28s ease 30ms !important;
  pointer-events: none !important;
}

.bottom-nav-bar.nav-hidden {
  transform: translateY(100%) !important;
  opacity: 0 !important;
  filter: blur(8px) !important;
  transition: transform 0.36s cubic-bezier(0.16, 1, 0.3, 1) 60ms,
              opacity 0.28s ease 60ms,
              filter 0.28s ease 60ms !important;
  pointer-events: none !important;
}

.nav-tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.1;
  transition: all 0.2s ease;
  cursor: pointer;
  background: none;
  border: none;
  padding: 2px 6px;
}

.nav-tab-item svg {
  width: 17px;
  height: 17px;
  stroke: var(--text-secondary);
  stroke-width: 2;
  fill: none;
  transition: all 0.2s ease;
}

.nav-tab-item.active {
  color: var(--color-primary);
}

.nav-tab-item.active svg {
  stroke: var(--color-primary);
  filter: drop-shadow(0 0 6px rgba(45, 123, 255, 0.6));
}

/* Home Indicator Bar - Ẩn trên mọi màn hình để nhường chỗ dính sát đáy cho thanh footer */
.ios-home-indicator {
  display: none !important;
}

/* ==========================================================================
   SUBTABS & CONVERSATION DETAIL STYLING (E-01 & C-01)
   ========================================================================== */
.sheet-subnav-tabs {
  display: flex;
  background: #0A1426;
  border: 1px solid #203354;
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
  margin-bottom: 12px;
}
.sheet-subnav-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
  padding: 6px 2px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}
.sheet-subnav-btn.active {
  background: var(--color-primary);
  color: #FFFFFF;
  box-shadow: 0 0 10px rgba(45, 123, 255, 0.4);
}

.chat-bubble-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
}

.chat-msg-bubble {
  padding: 10px 12px;
  border-radius: 14px;
  max-width: 88%;
  font-size: 12px;
  line-height: 1.45;
}

.chat-msg-user {
  align-self: flex-start;
  background: #152238;
  color: #E2E8F0;
  border: 1px solid #283C60;
  border-bottom-left-radius: 4px;
}

.chat-msg-bot {
  align-self: flex-end;
  background: linear-gradient(135deg, #153B7A 0%, #2563EB 100%);
  color: #FFFFFF;
  border: 1px solid #3B82F6;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.chat-msg-author {
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 3px;
  color: var(--color-cyan);
}
.chat-msg-user .chat-msg-author {
  color: #94A3B8;
}

.chat-msg-time {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 4px;
  text-align: right;
}

.timeline-step-node {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  position: relative;
}
.timeline-step-node::before {
  content: '';
  position: absolute;
  top: 24px;
  bottom: -6px;
  left: 9px;
  width: 2px;
  background: #203354;
}
.timeline-step-node:last-child::before {
  display: none;
}
.timeline-step-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
  z-index: 1;
}

/* ==========================================================================
   IMPROVEMENT TAB (LUỒNG F & RETEACH STUDIO - F-01 -> F-04, H-05)
   ========================================================================== */

/* 1. Horizontal Scrollable Stepper Track (Box 1) */
.horizontal-stepper-container {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 8px 4px 12px 4px;
  scrollbar-width: thin;
  scrollbar-color: #203354 transparent;
  cursor: grab;
  user-select: none;
}
.horizontal-stepper-container:active {
  cursor: grabbing;
}
.horizontal-stepper-container::-webkit-scrollbar {
  height: 4px;
}
.horizontal-stepper-container::-webkit-scrollbar-thumb {
  background: #203354;
  border-radius: 4px;
}
.horizontal-stepper-track {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
}
.hstep-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hstep-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 12px;
  background: #0A1426;
  border: 1px solid #203354;
  border-radius: 12px;
  font-size: 11px;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  white-space: nowrap;
  min-width: 90px;
  text-align: center;
}
.hstep-node.active {
  background: #152A4A;
  border-color: var(--color-primary);
  color: #FFFFFF;
  box-shadow: 0 0 12px rgba(45, 123, 255, 0.35);
}
.hstep-node.completed {
  background: rgba(16, 217, 129, 0.08);
  border-color: rgba(16, 217, 129, 0.4);
  color: #10D981;
}
.hstep-node.warning {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.4);
  color: #F59E0B;
}
.hstep-num {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 2px;
  opacity: 0.75;
}
.hstep-title {
  font-weight: 600;
  font-size: 11px;
}
.hstep-arrow {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

/* 2. Candidate Diff View (F-02 & F-03) */
.diff-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
}
.diff-card {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.45;
}
.diff-card-before {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #FECACA;
}
.diff-card-after {
  background: rgba(16, 217, 129, 0.1);
  border: 1px solid rgba(16, 217, 129, 0.3);
  color: #A7F3D0;
}
.diff-badge-red {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  background: #EF4444;
  color: #FFFFFF;
  padding: 1px 6px;
  border-radius: 4px;
  margin-bottom: 4px;
}
.diff-badge-green {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  background: #10D981;
  color: #FFFFFF;
  padding: 1px 6px;
  border-radius: 4px;
  margin-bottom: 4px;
}

/* 3. Version Snapshot & Rollback */
.snapshot-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0D1B2E;
  border: 1px dashed #283C60;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 10px;
  color: #94A3B8;
  margin-bottom: 10px;
}
.snapshot-restore-btn {
  background: transparent;
  border: 1px solid #3B82F6;
  color: #3B82F6;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.snapshot-restore-btn:hover {
  background: #3B82F6;
  color: #FFFFFF;
}

/* 4. RETEACH Studio & Anti-regression Check */
.regression-guard-card {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.regression-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-cyan);
  margin-bottom: 6px;
}
.regression-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.regression-stat-box {
  background: #0A1426;
  border: 1px solid #203354;
  border-radius: 6px;
  padding: 6px 8px;
  text-align: center;
}
.regression-stat-val {
  font-size: 14px;
  font-weight: 700;
  color: #10D981;
}
.regression-stat-lbl {
  font-size: 9px;
  color: #94A3B8;
}

/* ==========================================================================
   NATIVE IPHONE & STANDALONE PWA ADAPTATION
   Tự động phát hiện khi chạy trên iPhone / Mobile hoặc khi đã Add to Home Screen:
   - Ẩn khung giả lập máy tính, viền điện thoại 390px, và thanh điều khiển top-bar
   - Tràn viền 100% màn hình thiết bị (100dvh)
   - Tối ưu safe-area-inset cho tai thỏ/Dynamic Island và Home Indicator bar
   ========================================================================== */
@media (max-width: 600px), (display-mode: standalone) {
  html, body {
    width: 100% !important;
    height: 100% !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    padding: 0 !important;
    margin: 0 !important;
    background: var(--bg-main) !important;
    overflow-x: hidden !important;
    align-items: stretch !important;
    justify-content: stretch !important;
  }

  .desktop-wrapper {
    width: 100% !important;
    height: 100% !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  /* Ẩn hoàn toàn thanh điều khiển giả lập iPhone 15 Pro trên thiết bị thật */
  .top-bar-controls {
    display: none !important;
  }

  /* Khung Canvas tràn viền 100% cố định tuyệt đối theo viewport thiết bị */
  .mobile-viewport {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  /* Ẩn hoàn toàn Status Bar giả (9:41) trên điện thoại thật */
  .status-bar {
    display: none !important;
  }

  /* Header bám cố định đỉnh màn hình dưới Dynamic Island */
  .top-app-bar {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding-top: max(50px, env(safe-area-inset-top, 50px)) !important;
    padding-bottom: 10px !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  .view-switcher-pill {
    top: calc(max(50px, env(safe-area-inset-top, 50px)) + 46px) !important;
  }

  /* Bottom Navigation Bar: Thấp sát đáy, siêu thanh thoát, giải phóng tối đa diện tích màn hình */
  .bottom-nav-bar {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 44px !important;
    padding-top: 3px !important;
    padding-bottom: max(4px, env(safe-area-inset-bottom, 4px)) !important;
    height: auto !important;
  }

  /* Vùng cuộn nội dung: Chiếm trọn 100% màn hình, đệm đầu và đuôi chính xác */
  .screen-scroll-container {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding-top: calc(max(50px, env(safe-area-inset-top, 50px)) + 50px) !important;
    padding-bottom: max(52px, calc(env(safe-area-inset-bottom, 4px) + 44px)) !important;
  }

  .screen-scroll-container.home-active {
    padding-top: calc(max(50px, env(safe-area-inset-top, 50px)) + 104px) !important;
  }

  /* Ẩn Home Indicator giả khi trên iPhone thật vì iPhone đã có vạch vật lý */
  .ios-home-indicator {
    display: none !important;
  }

  /* Định vị lại Omni Beacon trên màn hình điện thoại nhỏ */
  .omni-beacon-widget {
    top: auto !important;
    bottom: 58px !important;
    right: 12px !important;
    transform: scale(0.8);
  }
}

/* Khi chạy ở chế độ Standalone (WebClip / PWA trên iPhone) */
@media (display-mode: standalone) {
  .status-bar {
    display: none !important;
  }
  .top-app-bar {
    padding-top: max(50px, env(safe-area-inset-top, 50px)) !important;
  }
}

/* ==========================================================================
   AUTO TEST FLOW — 5-STATE CYBER-LUXURY ARCHITECTURE (AUTO-15 -> AUTO-19)
   ORDER: ORD-BO-C1-AUTO-TEST-FLOW-QUEUE-20260917-001
   ========================================================================== */

/* Sub-views Container & Transition */
.flow-sub-view {
  display: none;
  flex-direction: column;
  width: 100%;
  animation: fadeIn 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.flow-sub-view.active {
  display: flex;
}

/* Sub-view Top Header Bar */
.flow-view-header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.flow-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: #00E5FF;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.flow-back-btn:hover {
  background: rgba(0, 229, 255, 0.1);
}

.flow-header-title-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #94A3B8;
}

/* ==========================================================================
   TAB AUTO — PIXEL-PERFECT ACCORDION ARCHITECTURE (CHÍNH XÁC THEO 8 ẢNH BO-01)
   ========================================================================== */


/* Hero Card: Luồng tự động */
.auto-hero-card {
  background: linear-gradient(145deg, rgba(8, 22, 42, 0.95), rgba(4, 14, 28, 0.98));
  border: 1px solid rgba(0, 229, 255, 0.35);
  box-shadow: 0 8px 32px rgba(0, 229, 255, 0.12);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.auto-hero-body {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.auto-hero-info {
  flex: 1;
}

.auto-hero-badge-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.auto-lightning-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: #00E5FF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.2);
}

.auto-hero-title {
  font-size: 16px;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 3px 0;
  letter-spacing: 0.3px;
}

.auto-hero-desc {
  font-size: 11px;
  color: #94A3B8;
  margin: 0;
  line-height: 1.4;
}

/* Right diagram: Chatbot flow schematic */
.auto-hero-diagram {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}

.auto-diagram-quote {
  font-size: 9px;
  font-style: italic;
  color: #00E5FF;
  opacity: 0.9;
  text-align: right;
  line-height: 1.3;
  margin-bottom: 6px;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}

.auto-diagram-nodes {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 229, 255, 0.05);
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(0, 229, 255, 0.2);
  font-size: 11px;
}

.auto-diagram-nodes .node-item {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.node-msg { background: rgba(45, 123, 255, 0.25); color: #38BDF8; }
.node-user { background: rgba(168, 85, 247, 0.25); color: #C084FC; }
.node-code { background: rgba(245, 158, 11, 0.25); color: #FBBF24; }
.node-check { background: rgba(16, 185, 129, 0.25); color: #34D399; font-weight: bold; }
.node-arrow-right, .node-arrow-down { font-size: 10px; color: #00E5FF; }

/* 3 Metrics Row */
.auto-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.auto-metric-pill {
  background: rgba(10, 22, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.auto-metric-pill.blue { border-color: rgba(45, 123, 255, 0.35); }
.auto-metric-pill.green { border-color: rgba(16, 185, 129, 0.35); }
.auto-metric-pill.yellow { border-color: rgba(245, 158, 11, 0.35); }

.auto-metric-pill .metric-icon {
  font-size: 16px;
}

.auto-metric-pill .metric-info {
  display: flex;
  flex-direction: column;
}

.auto-metric-pill .metric-val {
  font-size: 14px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.1;
}

.auto-metric-pill .metric-lbl {
  font-size: 9px;
  color: #94A3B8;
}

/* 2 Hero Buttons */
.auto-hero-actions {
  display: flex;
  gap: 10px;
}

.auto-btn-view {
  flex: 1.15;
  background: #00E5FF;
  color: #071324;
  font-size: 12.5px;
  font-weight: 800;
  border-radius: 24px;
  padding: 10px 16px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.4);
  transition: all 0.2s;
}

.auto-btn-view:hover {
  background: #38EFFF;
  transform: translateY(-1px);
}

.auto-btn-test {
  flex: 1;
  background: rgba(0, 229, 255, 0.08);
  color: #FFFFFF;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 24px;
  padding: 10px 16px;
  border: 1px solid rgba(0, 229, 255, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.auto-btn-test:hover {
  background: rgba(0, 229, 255, 0.16);
  border-color: #00E5FF;
  transform: translateY(-1px);
}

/* Section Header */
.auto-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 20px 0 10px 0;
  padding: 0 2px;
}

.auto-section-header .sec-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.auto-section-header .sec-icon {
  color: #00E5FF;
  font-size: 12px;
}

.auto-section-header .sec-title {
  font-size: 13px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: 0.3px;
}

.auto-section-header .sec-sub {
  font-size: 9.5px;
  color: #64748B;
}

/* Accordion Card */
.auto-accordion-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auto-acc-card {
  background: rgba(11, 23, 44, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.auto-acc-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.auto-acc-card.expanded {
  border-color: rgba(0, 229, 255, 0.45);
  box-shadow: 0 6px 24px rgba(0, 229, 255, 0.1);
  background: rgba(13, 27, 52, 0.9);
}

.auto-acc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 14px;
  cursor: pointer;
  user-select: none;
}

.acc-h-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.acc-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.acc-icon-box.bg-blue { background: rgba(45, 123, 255, 0.18); border: 1px solid rgba(45, 123, 255, 0.35); color: #38BDF8; }
.acc-icon-box.bg-green { background: rgba(16, 185, 129, 0.18); border: 1px solid rgba(16, 185, 129, 0.35); color: #34D399; }
.acc-icon-box.bg-yellow { background: rgba(245, 158, 11, 0.18); border: 1px solid rgba(245, 158, 11, 0.35); color: #FBBF24; }
.acc-icon-box.bg-purple { background: rgba(168, 85, 247, 0.18); border: 1px solid rgba(168, 85, 247, 0.35); color: #C084FC; }
.acc-icon-box.bg-teal { background: rgba(20, 184, 166, 0.18); border: 1px solid rgba(20, 184, 166, 0.35); color: #2DD4BF; }
.acc-icon-box.bg-cyan { background: rgba(0, 229, 255, 0.18); border: 1px solid rgba(0, 229, 255, 0.35); color: #00E5FF; }

.acc-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
}

.acc-desc {
  font-size: 9.5px;
  color: #94A3B8;
  margin-top: 2px;
}

.acc-h-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.acc-badge {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  font-size: 9px;
  font-weight: 600;
  padding: 3px 8px;
  color: #CBD5E1;
}

.acc-pill {
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 9999px;
}

.acc-pill.muted {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94A3B8;
}

.acc-pill.warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #FBBF24;
}

.acc-chevron {
  color: #64748B;
  font-size: 13px;
  font-weight: bold;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-block;
}

.auto-acc-card.expanded .acc-chevron {
  transform: rotate(90deg);
  color: #00E5FF;
}

/* Accordion Body & Panels */
.auto-acc-body {
  display: none;
  padding: 0 14px 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.auto-acc-card.expanded .auto-acc-body {
  display: block;
  animation: slideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 1. Touchpoint Rows */
.touchpoint-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
}

.touchpoint-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(6, 15, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 9px 10px;
}

.tp-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tp-icon-circle {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.tp-icon-circle.blue { background: rgba(45, 123, 255, 0.15); color: #38BDF8; }
.tp-icon-circle.cyan { background: rgba(0, 229, 255, 0.15); color: #00E5FF; }
.tp-icon-circle.purple { background: rgba(168, 85, 247, 0.15); color: #C084FC; }
.tp-icon-circle.amber { background: rgba(245, 158, 11, 0.15); color: #FBBF24; }

.tp-name {
  font-size: 11.5px;
  font-weight: 700;
  color: #FFFFFF;
}

.tp-desc {
  font-size: 9px;
  color: #94A3B8;
}

.tp-actions {
  display: flex;
  gap: 6px;
}

.btn-tp-outline {
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.25);
  color: #00E5FF;
  font-size: 9.5px;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-tp-outline:hover {
  background: rgba(0, 229, 255, 0.15);
}

.btn-tp-edit {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #E2E8F0;
  font-size: 9.5px;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-tp-edit:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* 2. Triggers Panel */
.triggers-panel {
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trigger-sub-box {
  background: rgba(6, 15, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 10px;
}

.sub-box-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.sub-box-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #FFFFFF;
  margin-right: 6px;
}

.sub-box-desc {
  font-size: 9px;
  color: #94A3B8;
}

.sub-box-count {
  font-size: 9px;
  color: #00E5FF;
  cursor: pointer;
}

.tag-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 9.5px;
  color: #E2E8F0;
}

.tag-chip.code {
  font-family: monospace;
  color: #00E5FF;
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.25);
}

.tag-chip-add {
  background: rgba(0, 229, 255, 0.06);
  border: 1px dashed rgba(0, 229, 255, 0.4);
  color: #00E5FF;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 9.5px;
  font-weight: 700;
  cursor: pointer;
}

.trigger-bottom-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.btn-trig-sec {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 700;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}

.btn-trig-pri {
  flex: 1.2;
  background: #00E5FF;
  border: none;
  color: #071324;
  font-size: 10.5px;
  font-weight: 800;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}

/* 3. Nurture Panel */
.nurture-panel {
  padding-top: 10px;
}

.nurture-lead {
  font-size: 9.5px;
  color: #94A3B8;
  margin-bottom: 10px;
}

.nurture-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nurture-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(6, 15, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 9px 10px;
}

.nr-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nr-icon-box {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.nr-icon-box.purple { background: rgba(168, 85, 247, 0.15); color: #C084FC; }
.nr-icon-box.green { background: rgba(16, 185, 129, 0.15); color: #34D399; }
.nr-icon-box.yellow { background: rgba(245, 158, 11, 0.15); color: #FBBF24; }
.nr-icon-box.red { background: rgba(239, 68, 68, 0.15); color: #F87171; }

.nr-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #FFFFFF;
}

.nr-desc {
  font-size: 9px;
  color: #94A3B8;
}

.nr-actions {
  display: flex;
  gap: 4px;
}

.btn-nr-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #CBD5E1;
  font-size: 9px;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-nr-action:hover {
  border-color: #00E5FF;
  color: #00E5FF;
}

/* 4. AI Panel */
.ai-agents-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
}

.ai-agent-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(6, 15, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 9px 10px;
}

.ai-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.ai-avatar.cyan { background: rgba(0, 229, 255, 0.15); color: #00E5FF; }
.ai-avatar.green { background: rgba(16, 185, 129, 0.15); color: #34D399; }
.ai-avatar.yellow { background: rgba(245, 158, 11, 0.15); color: #FBBF24; }
.ai-avatar.red { background: rgba(239, 68, 68, 0.15); color: #F87171; }
.ai-avatar.purple { background: rgba(168, 85, 247, 0.15); color: #C084FC; }

.ai-name {
  font-size: 11.5px;
  font-weight: 700;
  color: #FFFFFF;
}

.ai-desc {
  font-size: 9px;
  color: #94A3B8;
}

.ai-actions {
  display: flex;
  gap: 4px;
}

.btn-ai-act {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #CBD5E1;
  font-size: 9px;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-ai-act.pri {
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.3);
  color: #00E5FF;
}

/* 5. Data Panel */
.data-fields-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
}

.data-field-card {
  background: rgba(6, 15, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 10px;
}

.df-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.df-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.df-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.df-icon.purple { background: rgba(168, 85, 247, 0.15); color: #C084FC; }
.df-icon.green { background: rgba(16, 185, 129, 0.15); color: #34D399; }
.df-icon.yellow { background: rgba(245, 158, 11, 0.15); color: #FBBF24; }

.df-name {
  font-size: 11.5px;
  font-weight: 700;
  color: #FFFFFF;
}

.df-desc {
  font-size: 9px;
  color: #94A3B8;
}

.df-example {
  font-size: 8.5px;
  font-family: monospace;
  color: #38BDF8;
  background: rgba(56, 189, 248, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

.df-actions {
  display: flex;
  gap: 6px;
}

.btn-df-act {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #CBD5E1;
  font-size: 9.5px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-df-act.pri {
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.3);
  color: #00E5FF;
}

/* 6. Integrations Panel */
.integration-panel {
  padding-top: 10px;
}

.integ-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 9.5px;
  color: #94A3B8;
  margin-bottom: 12px;
}

.integ-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.integ-tile {
  background: rgba(6, 15, 30, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.it-icon {
  font-size: 14px;
}

.it-name {
  font-size: 8.5px;
  font-weight: 700;
  color: #FFFFFF;
}

.it-badge {
  font-size: 7.5px;
  padding: 1px 4px;
  border-radius: 4px;
}

.it-badge.preview {
  background: rgba(0, 229, 255, 0.15);
  color: #00E5FF;
}

.it-badge.disabled {
  background: rgba(255, 255, 255, 0.05);
  color: #64748B;
}

.integ-actions {
  display: flex;
  gap: 8px;
}

.btn-integ-sec {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 700;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}

.btn-integ-pri {
  flex: 1.2;
  background: #00E5FF;
  border: none;
  color: #071324;
  font-size: 10.5px;
  font-weight: 800;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}

/* 7. Advanced Panel */
.advanced-panel {
  padding-top: 10px;
}

.adv-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 12px;
}

.adv-banner-icon {
  font-size: 18px;
}

.adv-banner b {
  font-size: 10.5px;
  color: #FBBF24;
  display: block;
  margin-bottom: 2px;
}

.adv-banner p {
  font-size: 9px;
  color: #94A3B8;
  margin: 0;
  line-height: 1.35;
}

.adv-modules-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.adv-mod-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(6, 15, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 9px 10px;
}

.ami-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ami-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.ami-icon.purple { background: rgba(168, 85, 247, 0.15); color: #C084FC; }
.ami-icon.green { background: rgba(16, 185, 129, 0.15); color: #34D399; }
.ami-icon.amber { background: rgba(245, 158, 11, 0.15); color: #FBBF24; }
.ami-icon.blue { background: rgba(45, 123, 255, 0.15); color: #38BDF8; }

.ami-name {
  font-size: 11.5px;
  font-weight: 700;
  color: #FFFFFF;
}

.ami-desc {
  font-size: 9px;
  color: #94A3B8;
}

.ami-pill {
  font-size: 8.5px;
  font-weight: 700;
  color: #94A3B8;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3px 6px;
  border-radius: 4px;
}

.adv-actions {
  display: flex;
  gap: 8px;
}

.btn-adv-sec {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 700;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}

.btn-adv-pri {
  flex: 1;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: #00E5FF;
  font-size: 10.5px;
  font-weight: 800;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}

/* 8. Admin Chrome 9223 Card */
.auto-admin-card {
  background: rgba(11, 23, 44, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.25s;
}

.auto-admin-card:hover {
  border-color: rgba(0, 229, 255, 0.3);
}

.admin-card-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chrome-logo-box {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #FFFFFF;
}

.admin-desc {
  font-size: 9.5px;
  color: #94A3B8;
}

.admin-card-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-status-dot {
  display: flex;
  align-items: center;
  gap: 5px;
}

.dot-green {
  width: 6px;
  height: 6px;
  background: #10D981;
  border-radius: 50%;
  box-shadow: 0 0 6px #10D981;
}

.status-txt {
  font-size: 9.5px;
  color: #10D981;
  font-weight: 600;
}

.btn-admin-open {
  background: #00E5FF;
  border: none;
  color: #071324;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
  transition: all 0.2s;
}

.btn-admin-open:hover {
  background: #38EFFF;
  transform: translateY(-1px);
}

/* --- AUTO-16: FLOW TEST SELECTOR --- */
.auto16-search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.auto16-search-input {
  flex: 1;
  background: rgba(8, 16, 32, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 11px;
  color: #FFFFFF;
}

.auto16-filter-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0 12px;
  color: #FFFFFF;
  cursor: pointer;
}

.auto16-flow-card {
  background: rgba(10, 20, 38, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.auto16-flow-card.recommended {
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.15);
}

.auto16-enter-btn {
  width: 100%;
  background: linear-gradient(90deg, #2D7BFF, #8B5CF6);
  border: none;
  border-radius: 8px;
  color: #FFFFFF;
  padding: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}

/* --- AUTO-18: TEST CASE DETAIL STEPPER --- */
.auto18-stepper-box {
  background: rgba(8, 16, 32, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}

.auto18-step-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.auto18-step-row:last-child {
  border-bottom: none;
}

.auto18-step-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid #00E5FF;
  color: #00E5FF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
}

/* --- AUTO-19: LIVE MONITOR & TAKEOVER --- */
.auto19-live-screen-box {
  background: #020610;
  border: 1px solid rgba(0, 229, 255, 0.4);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 12px;
  box-shadow: 0 4px 20px rgba(0, 229, 255, 0.15);
}

.auto19-control-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.auto19-ctrl-btn {
  border-radius: 8px;
  padding: 8px 4px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: none;
}

.auto19-ctrl-btn.blue { background: rgba(45, 123, 255, 0.2); border: 1px solid #2D7BFF; color: #60A5FA; }
.auto19-ctrl-btn.amber { background: rgba(245, 158, 11, 0.2); border: 1px solid #F59E0B; color: #FBBF24; }
.auto19-ctrl-btn.purple { background: rgba(139, 92, 246, 0.25); border: 1.5px solid #8B5CF6; color: #C084FC; }
.auto19-ctrl-btn.green { background: rgba(16, 217, 129, 0.2); border: 1px solid #10D981; color: #34D399; }

.auto19-takeover-flow {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 12px;
}

.auto19-flow-step-card {
  min-width: 80px;
  background: rgba(10, 20, 36, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 6px;
  font-size: 9px;
  text-align: center;
}

.auto19-alert-banner {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid #EF4444;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 10.5px;
  color: #FCA5A5;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dev-note-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 10px;
  color: #94A3B8;
  margin-top: 10px;
  line-height: 1.4;
}

/* ========================================================================= */
/* TAB AUTO EXTENSION: 3 BLOCKS THEO 8 ẢNH BO-01 (15:59 - 16:00 17/09/2026) */
/* ========================================================================= */

/* --- 1. KHỐI LUỒNG CỦA TÔI --- */
.my-flows-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 12px;
}

.flow-search-filter-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.flow-search-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.flow-search-input {
  width: 100%;
  background: rgba(8, 18, 36, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 20px;
  padding: 8px 14px 8px 34px;
  font-size: 11px;
  color: #FFFFFF;
  outline: none;
  transition: all 0.2s ease;
}
.flow-search-input:focus {
  border-color: #00E5FF;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.25);
}

.flow-search-icon {
  position: absolute;
  left: 12px;
  font-size: 11px;
  color: #64748B;
  pointer-events: none;
}

.flow-filter-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94A3B8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}
.flow-filter-icon-btn:hover {
  color: #00E5FF;
  border-color: rgba(0, 229, 255, 0.4);
}

/* 4 Filter Tabs */
.my-flow-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.my-flow-tabs::-webkit-scrollbar { display: none; }

.my-flow-tab-btn {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 10px;
  font-weight: 600;
  color: #94A3B8;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}
.my-flow-tab-btn.active {
  background: rgba(0, 229, 255, 0.15);
  border-color: #00E5FF;
  color: #00E5FF;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

/* Flow Cards List */
.my-flow-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.my-flow-item-card {
  background: rgba(8, 18, 36, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
}
.my-flow-item-card:hover {
  border-color: rgba(0, 229, 255, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.my-flow-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.my-flow-title-grp {
  display: flex;
  gap: 10px;
  align-items: center;
}

.my-flow-icon-circle {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.my-flow-icon-circle.cyan { background: rgba(0, 229, 255, 0.15); color: #00E5FF; border: 1px solid rgba(0, 229, 255, 0.3); }
.my-flow-icon-circle.blue { background: rgba(59, 130, 246, 0.15); color: #60A5FA; border: 1px solid rgba(59, 130, 246, 0.3); }
.my-flow-icon-circle.purple { background: rgba(168, 85, 247, 0.15); color: #C084FC; border: 1px solid rgba(168, 85, 247, 0.3); }
.my-flow-icon-circle.amber { background: rgba(245, 158, 11, 0.15); color: #FBBF24; border: 1px solid rgba(245, 158, 11, 0.3); }

.my-flow-name {
  font-size: 12px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.3;
}

.my-flow-sub {
  font-size: 9.5px;
  color: #94A3B8;
  margin-top: 2px;
}

.my-flow-status-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Badge trạng thái */
.flow-status-badge {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.flow-status-badge.active {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34D399;
}
.flow-status-badge.draft {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #94A3B8;
}
.flow-status-badge.paused {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #FBBF24;
}

/* Toggle switch */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 30px;
  height: 17px;
}
.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 34px;
}
.switch-slider:before {
  position: absolute;
  content: "";
  height: 13px;
  width: 13px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
}
input:checked + .switch-slider {
  background-color: #00E5FF;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
}
input:checked + .switch-slider:before {
  transform: translateX(13px);
  background-color: #081224;
}

.my-flow-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.my-flow-meta-info {
  font-size: 9px;
  color: #64748B;
}

.my-flow-btn-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

.btn-flow-action {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 9.5px;
  color: #E2E8F0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}
.btn-flow-action:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: rgba(0, 229, 255, 0.4);
  color: #00E5FF;
}
.btn-flow-action.primary {
  background: rgba(0, 229, 255, 0.15);
  border-color: #00E5FF;
  color: #00E5FF;
  font-weight: 700;
}
.btn-flow-action.more {
  padding: 4px 6px;
}

.my-flows-bottom-bar {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.btn-bottom-create {
  flex: 1.2;
  background: linear-gradient(135deg, #00E5FF, #0077FF);
  color: #04101E;
  font-size: 11px;
  font-weight: 800;
  border-radius: 12px;
  padding: 9px 12px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(0, 229, 255, 0.3);
  transition: all 0.2s;
}
.btn-bottom-create:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}
.btn-bottom-order {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #E2E8F0;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  padding: 9px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}
.btn-bottom-order:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

/* --- 2. KHỐI TẠO LUỒNG THÔNG MINH --- */
.ai-create-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 12px;
}

.ai-idea-box {
  background: rgba(8, 18, 36, 0.85);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 14px;
  padding: 10px 12px;
  position: relative;
  transition: all 0.2s;
}
.ai-idea-box:focus-within {
  border-color: #A855F7;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.25);
}

.ai-idea-textarea {
  width: 100%;
  height: 68px;
  background: transparent;
  border: none;
  outline: none;
  font-size: 11px;
  color: #FFFFFF;
  line-height: 1.4;
  resize: none;
  font-family: inherit;
}
.ai-idea-textarea::placeholder {
  color: #64748B;
}

.ai-idea-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.ai-char-counter {
  font-size: 9px;
  color: #64748B;
}

/* Nút giọng nói lớn (Big Voice Mic) */
.ai-voice-mic-card {
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.35), rgba(15, 23, 42, 0.9));
  border: 1.5px solid rgba(168, 85, 247, 0.5);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.ai-voice-mic-card:hover {
  border-color: #C084FC;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
  transform: translateY(-1px);
}
.ai-voice-mic-card.listening {
  border-color: #EC4899;
  box-shadow: 0 0 24px rgba(236, 72, 153, 0.45);
  background: linear-gradient(135deg, rgba(190, 24, 93, 0.35), rgba(15, 23, 42, 0.9));
}

.voice-mic-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.voice-mic-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #A855F7, #6366F1);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.5);
  flex-shrink: 0;
  transition: all 0.2s;
}
.ai-voice-mic-card.listening .voice-mic-circle {
  background: linear-gradient(135deg, #EC4899, #F43F5E);
  animation: pulse-mic 1s infinite alternate;
}

@keyframes pulse-mic {
  from { transform: scale(1); box-shadow: 0 0 10px rgba(244, 63, 94, 0.5); }
  to { transform: scale(1.1); box-shadow: 0 0 24px rgba(244, 63, 94, 0.9); }
}

.voice-mic-title {
  font-size: 13px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 2px;
}

.voice-mic-desc {
  font-size: 9.5px;
  color: #C084FC;
}

/* Audio Waveform Animation */
.voice-wave-container {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 24px;
}

.voice-wave-bar {
  width: 3px;
  height: 6px;
  background: #C084FC;
  border-radius: 3px;
  transition: height 0.15s ease;
}
.ai-voice-mic-card.listening .voice-wave-bar {
  background: #F43F5E;
  animation: wave-bounce 0.8s infinite ease-in-out;
}
.voice-wave-bar:nth-child(1) { animation-delay: 0.1s; }
.voice-wave-bar:nth-child(2) { animation-delay: 0.2s; }
.voice-wave-bar:nth-child(3) { animation-delay: 0.3s; }
.voice-wave-bar:nth-child(4) { animation-delay: 0.4s; }
.voice-wave-bar:nth-child(5) { animation-delay: 0.5s; }

@keyframes wave-bounce {
  0%, 100% { height: 6px; }
  50% { height: 22px; }
}

/* 2 nút phụ tạo luồng */
.ai-create-dual-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-dual-create {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}
.btn-dual-create:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.3);
}

.dual-btn-icon {
  font-size: 16px;
}

.dual-btn-title {
  font-size: 11px;
  font-weight: 700;
  color: #FFFFFF;
}

.dual-btn-desc {
  font-size: 8.5px;
  color: #94A3B8;
}

/* Quy trình AI 6 bước */
.ai-workflow-box {
  background: rgba(6, 14, 28, 0.8);
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 12px;
  padding: 10px;
}

.ai-wf-title {
  font-size: 10px;
  font-weight: 800;
  color: #00E5FF;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.ai-wf-steps-track {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.ai-wf-steps-track::-webkit-scrollbar { display: none; }

.ai-wf-step-item {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  color: #CBD5E1;
  white-space: nowrap;
  flex-shrink: 0;
}
.ai-wf-step-item.active {
  border-color: #00E5FF;
  color: #00E5FF;
  background: rgba(0, 229, 255, 0.1);
}

.ai-wf-step-arrow {
  color: #475569;
  font-size: 10px;
  flex-shrink: 0;
}

/* Prompt Chips */
.ai-prompt-chips-row {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.ai-prompt-chips-row::-webkit-scrollbar { display: none; }

.prompt-chip {
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 9px;
  color: #00E5FF;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}
.prompt-chip:hover {
  background: rgba(0, 229, 255, 0.2);
  border-color: #00E5FF;
}

/* --- 3. KHỐI GỢI Ý LUỒNG TỪ AI --- */
.ai-sugg-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 12px;
}

.ai-sugg-chips-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.ai-sugg-chips-row::-webkit-scrollbar { display: none; }

.sugg-chip-btn {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 10.5px;
  font-weight: 700;
  color: #94A3B8;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}
.sugg-chip-btn.active {
  background: #00E5FF;
  color: #04101E;
  border-color: #00E5FF;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
}

/* Suggestion Card */
.sugg-flow-card {
  background: rgba(8, 18, 36, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s;
}
.sugg-flow-card:hover {
  border-color: rgba(0, 229, 255, 0.3);
}
.sugg-flow-card.featured {
  border-color: rgba(0, 229, 255, 0.4);
  box-shadow: 0 4px 20px rgba(0, 229, 255, 0.08);
}

.sugg-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.sugg-info-grp {
  display: flex;
  gap: 10px;
  align-items: center;
}

.sugg-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.sugg-icon-box.purple { background: rgba(168, 85, 247, 0.18); border: 1px solid rgba(168, 85, 247, 0.4); color: #C084FC; }
.sugg-icon-box.blue { background: rgba(59, 130, 246, 0.18); border: 1px solid rgba(59, 130, 246, 0.4); color: #60A5FA; }
.sugg-icon-box.amber { background: rgba(245, 158, 11, 0.18); border: 1px solid rgba(245, 158, 11, 0.4); color: #FBBF24; }
.sugg-icon-box.teal { background: rgba(20, 184, 166, 0.18); border: 1px solid rgba(20, 184, 166, 0.4); color: #2DD4BF; }
.sugg-icon-box.cyan { background: rgba(0, 229, 255, 0.18); border: 1px solid rgba(0, 229, 255, 0.4); color: #00E5FF; }

.sugg-title {
  font-size: 12px;
  font-weight: 700;
  color: #FFFFFF;
}

.sugg-desc {
  font-size: 9.5px;
  color: #94A3B8;
  margin-top: 2px;
  line-height: 1.35;
}

.sugg-badges-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.sugg-tag-pill {
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 9999px;
}
.sugg-tag-pill.ready { background: rgba(0, 229, 255, 0.15); border: 1px solid rgba(0, 229, 255, 0.4); color: #00E5FF; }
.sugg-tag-pill.popular { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.4); color: #34D399; }
.sugg-tag-pill.new { background: rgba(244, 63, 94, 0.15); border: 1px solid rgba(244, 63, 94, 0.4); color: #FB7185; }
.sugg-tag-pill.suggest { background: rgba(168, 85, 247, 0.15); border: 1px solid rgba(168, 85, 247, 0.4); color: #C084FC; }
.sugg-tag-pill.rec { background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.4); color: #FBBF24; }

.sugg-card-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}

.btn-sugg-act {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 9.5px;
  color: #E2E8F0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}
.btn-sugg-act:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: rgba(0, 229, 255, 0.4);
  color: #00E5FF;
}
.btn-sugg-act.use-tpl {
  background: rgba(0, 229, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.35);
  color: #00E5FF;
  font-weight: 700;
}
.btn-sugg-act.use-tpl:hover {
  background: #00E5FF;
  color: #04101E;
}

/* Mini Flow Visualization (Khi mở xem trước) */
.sugg-mini-flow-box {
  background: rgba(6, 14, 28, 0.7);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 10px;
  padding: 8px 10px;
}

.mini-flow-header {
  font-size: 9px;
  font-weight: 700;
  color: #00E5FF;
  margin-bottom: 6px;
}

.mini-flow-track {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.mini-flow-track::-webkit-scrollbar { display: none; }

.mini-flow-node {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 8.5px;
  color: #CBD5E1;
  white-space: nowrap;
  flex-shrink: 0;
}
.mini-flow-arrow {
  color: #475569;
  font-size: 9px;
  flex-shrink: 0;
}




