:root {
  --bg-primary: #fafaf9;
  --bg-secondary: #f1f5f9;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --card-hover-border: #cbd5e1;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --accent-emerald: #059669;
  --accent-emerald-glow: rgba(5, 150, 105, 0.15);
  --accent-cyan: #0284c7;
  --accent-amber: #d97706;
  --accent-indigo: #4f46e5;
  --accent-rose: #e11d48;

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Background Ambient Glow (Subtle Pastel) */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.05;
}

.bg-glow.top-right {
  top: -100px;
  right: -100px;
  width: 500px;
  height: 500px;
  background: #10b981;
}

.bg-glow.top-left {
  top: 10%;
  left: -150px;
  width: 600px;
  height: 600px;
  background: #38bdf8;
}

.bg-glow.bottom-center {
  bottom: -200px;
  left: 30%;
  width: 700px;
  height: 700px;
  background: #818cf8;
  opacity: 0.04;
}

/* Clean Cards (White Vibe) */
.glass-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.glass-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.06), 0 4px 10px -2px rgba(0, 0, 0, 0.03);
}

/* Helper Utilities */
.hidden {
  display: none !important;
}

.spin {
  animation: spin 1s linear infinite;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.btn-primary:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.2);
}

.btn-secondary {
  background: #ffffff;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.btn-danger-ghost {
  background: transparent;
  color: #e11d48;
  border: 1px solid rgba(225, 29, 72, 0.2);
}

.btn-danger-ghost:hover {
  background: #fff1f2;
  border-color: #e11d48;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 9px;
}

.btn-full {
  width: 100%;
}

.btn-whatsapp {
  background: #25d366;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(37, 211, 102, 0.25);
}

.btn-whatsapp:hover {
  background: #20ba5a;
  transform: scale(1.02);
}

/* Badges & Tags */
.badge, .tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.badge-emerald {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.badge-cyan {
  background: #f0f9ff;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.badge-amber {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.tag-secret {
  background: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
  font-weight: 700;
}

/* Gatekeeper (Master Key Screen) */
.gatekeeper-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  z-index: 10;
  background: #fafaf9;
}

.gatekeeper-card {
  width: 100%;
  max-width: 440px;
  padding: 36px 30px;
  text-align: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 35px -5px rgba(0, 0, 0, 0.08);
}

.shield-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.15);
}

.shield-icon {
  font-size: 32px;
  color: #059669;
}

.gatekeeper-header h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
  color: #0f172a;
}

.subtitle {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 12px;
}

.internal-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  background: #fffbeb;
  color: #d97706;
  border-radius: 6px;
  border: 1px solid #fde68a;
  margin-bottom: 24px;
}

.key-form {
  text-align: left;
}

.input-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.input-icon {
  position: absolute;
  left: 14px;
  font-size: 18px;
  color: #94a3b8;
  pointer-events: none;
}

.input-wrapper input {
  width: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 12px 42px 12px 42px;
  border-radius: 12px;
  color: #0f172a;
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
  font-family: var(--font-sans);
}

.input-toggle-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.input-toggle-btn:hover {
  color: #0f172a;
}

.input-wrapper input:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.alert {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12px;
  margin-bottom: 16px;
}

.alert-error {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #e11d48;
}

/* Dashboard Container */
.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  position: relative;
  z-index: 10;
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  margin-bottom: 24px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-title {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 11px;
  color: #64748b;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sync-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #475569;
  background: #f8fafc;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.countdown-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  background: #e2e8f0;
  padding: 2px 6px;
  border-radius: 6px;
  color: #0f172a;
}

/* Dashboard Content Grid */
.dashboard-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Product Filter Chips */
.product-filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  background: #ffffff;
  color: #475569;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.filter-chip:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.filter-chip.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.15);
}

.chip-count {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}

.filter-chip.active .chip-count {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.kpi-card {
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: #ffffff;
}

.kpi-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-icon-box span {
  font-size: 24px;
}

.kpi-icon-box.bg-emerald {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.kpi-icon-box.bg-cyan {
  background: #f0f9ff;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.kpi-icon-box.bg-amber {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.kpi-icon-box.bg-indigo {
  background: #eef2ff;
  color: #4f46e5;
  border: 1px solid #c7d2fe;
}

.kpi-body {
  flex: 1;
}

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  display: block;
  margin-bottom: 4px;
}

.kpi-value-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.kpi-value {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  font-family: var(--font-mono);
}

.kpi-unit {
  font-size: 13px;
  color: #64748b;
  font-weight: 600;
}

.trend-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.kpi-meta {
  font-size: 11px;
  color: #64748b;
}

/* Dual Column Layout */
.grid-2-col {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
}

@media (max-width: 1024px) {
  .grid-2-col {
    grid-template-columns: 1fr;
  }
}

/* Panel Containers */
.panel {
  padding: 24px;
  background: #ffffff;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

.panel-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.panel-subtitle {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

/* Ranking List */
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ranking-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 14px 16px;
  border-radius: 14px;
  transition: all 0.2s;
}

.ranking-item:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transform: translateX(2px);
}

.ranking-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ranking-name-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ranking-rank {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
}

.ranking-rank.top-1 {
  background: #0f172a;
  color: #ffffff;
}

.ranking-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.ranking-path {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #64748b;
}

.ranking-metrics {
  text-align: right;
}

.ranking-time {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #059669;
}

.ranking-visits {
  font-size: 11px;
  color: #64748b;
}

.ranking-bar-bg {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.ranking-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #10b981, #0ea5e9);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ranking Pagination Controls */
.ranking-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
  flex-wrap: wrap;
  gap: 10px;
}

.pagination-info {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

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

.btn-page {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-page:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.btn-page:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-current-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  background: #f1f5f9;
  border-radius: 6px;
  color: #475569;
}

/* Activity Stream */
.stream-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 440px;
  overflow-y: auto;
  padding-right: 4px;
}

.stream-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 12px;
}

.stream-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f0f9ff;
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.stream-body {
  flex: 1;
}

.stream-user {
  font-weight: 700;
  color: #0f172a;
}

.stream-action {
  color: #64748b;
}

.stream-target {
  font-family: var(--font-mono);
  font-weight: 600;
  color: #0284c7;
}

.stream-time {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 3px;
}

.stream-duration {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #059669;
  padding: 2px 6px;
  border-radius: 4px;
  background: #ecfdf5;
  white-space: nowrap;
}

/* Leads Table */
.table-panel-header {
  flex-wrap: wrap;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper span {
  position: absolute;
  left: 12px;
  font-size: 18px;
  color: #94a3b8;
}

.search-input-wrapper input {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 8px 14px 8px 38px;
  font-size: 12px;
  color: #0f172a;
  outline: none;
  min-width: 260px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input-wrapper input:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.data-table th {
  padding: 12px 14px;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.data-table td {
  padding: 14px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #334155;
}

.data-table tr:hover td {
  background: #f8fafc;
}

.client-name {
  font-weight: 700;
  color: #0f172a;
}

.client-id {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #64748b;
}

.mono-cell {
  font-family: var(--font-mono);
  font-size: 12px;
}

.status-select {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
}

.status-select.status-active {
  border-color: #38bdf8;
  color: #0284c7;
}

.status-select.status-contacted {
  border-color: #fde047;
  color: #d97706;
}

.status-select.status-converted {
  border-color: #86efac;
  color: #059669;
}

/* Feedbacks Grid */
.feedbacks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.feedback-card {
  padding: 18px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feedback-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.feedback-stars {
  display: flex;
  color: #f59e0b;
}

.feedback-feature {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 2px 8px;
  border-radius: 6px;
}

.feedback-comment {
  font-size: 13px;
  font-style: italic;
  color: #1e293b;
  line-height: 1.5;
}

.feedback-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.feedback-client {
  font-size: 11px;
  color: #64748b;
}

.feedback-client strong {
  color: #0f172a;
}

/* Footer */
.dashboard-footer {
  text-align: center;
  font-size: 12px;
  color: #64748b;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

/* Product Badges */
.badge-erp {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.04em;
}

.badge-hris {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.04em;
}

.badge-distributor {
  background: #faf5ff;
  color: #9333ea;
  border: 1px solid #e9d5ff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.04em;
}

.badge-eprocurement {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.04em;
}

.badge-website {
  background: #eef2ff;
  color: #4f46e5;
  border: 1px solid #c7d2fe;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.04em;
}

/* Chat & Live Sapa Pengunjung Button */
.btn-chat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #0f172a;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-chat:hover {
  background: #1e293b;
  color: #ffffff;
  border-color: #1e293b;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
  transform: translateY(-1px);
}

.badge-unread-chat {
  background: #e11d48;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 2px;
  animation: pulse-unread 2s infinite;
}

@keyframes pulse-unread {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Live Chat Drawer Styles (Clean White Vibe) */
.chat-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  justify-content: flex-end;
}

.chat-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.25s ease-out;
}

.chat-drawer-panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100%;
  background: #ffffff;
  border-left: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.12);
  animation: slideLeft 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

@keyframes slideLeft {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.chat-drawer-header {
  padding: 18px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-drawer-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0ea5e9, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.25);
}

.chat-user-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #0f172a;
  font-size: 15px;
}

.chat-user-meta {
  font-size: 11px;
  color: #64748b;
  font-family: var(--font-mono);
  margin-top: 2px;
}

.btn-icon-close {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-close:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

/* Quick Actions Presets */
.chat-quick-actions {
  padding: 12px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.quick-actions-label {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quick-chips-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quick-chip {
  text-align: left;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1.4;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.quick-chip:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4f46e5;
}

.quick-chip.ai-chip {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.quick-chip.ai-chip:hover {
  background: #dcfce7;
  border-color: #86efac;
}

.btn-ai-reload {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #059669;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ai-reload:hover {
  background: #f0fdf4;
  border-color: #a7f3d0;
  color: #047857;
}

.ai-chips-loading {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
  padding: 6px 10px;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
}

/* Messages Container */
.chat-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fafaf9;
}

.chat-bubble-row {
  display: flex;
  flex-direction: column;
  max-width: 82%;
}

.chat-bubble-row.agent {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-bubble-row.visitor {
  align-self: flex-start;
  align-items: flex-start;
}

.chat-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}

.chat-bubble-row.agent .chat-bubble {
  background: #0f172a;
  color: #ffffff;
  border-bottom-right-radius: 2px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

.chat-bubble-row.visitor .chat-bubble {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.chat-bubble-meta {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 4px;
  font-family: var(--font-mono);
}

/* Composer Form */
.chat-composer-form {
  padding: 16px 20px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}

.chat-input-wrapper {
  display: flex;
  gap: 8px;
  align-items: center;
}

.chat-input-wrapper input {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
}

.chat-input-wrapper input:focus {
  background: #ffffff;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.btn-send {
  background: #0f172a;
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-send:hover {
  background: #1e293b;
}

.chat-composer-hint {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 6px;
  text-align: center;
}

/* ==========================================================================
   SABER EXECUTIVE WAR ROOM & COMMAND CENTER EXPANSIONS
   Aesthetics matching saberconsulting.id
   ========================================================================== */

/* Full Layout Shell */
.warroom-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 5;
}

/* Executive Sidebar */
.warroom-sidebar {
  width: 280px;
  background: #0f1e36;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 30;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
}

.sidebar-brand-box {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.sidebar-emblem-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.sidebar-brand-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.sidebar-brand-title span {
  color: #0090ff;
}

.sidebar-brand-subtitle {
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

.sidebar-role-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 144, 255, 0.12);
  border: 1px solid rgba(0, 144, 255, 0.25);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
  color: #38bdf8;
  font-weight: 600;
}

.sidebar-role-pill .pulse-dot {
  background: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.8);
}

/* Sidebar Navigation Items */
.sidebar-nav {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.sidebar-nav-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  padding: 10px 12px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(0, 144, 255, 0.2), rgba(29, 78, 216, 0.3));
  border-color: rgba(0, 144, 255, 0.4);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 144, 255, 0.15);
}

.nav-item .nav-icon {
  font-size: 18px;
  color: #94a3b8;
  transition: color 0.2s;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
  color: #38bdf8;
}

.nav-item-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-item.active .nav-item-badge {
  background: #0090ff;
  color: #ffffff;
}

.nav-item-badge.badge-urgent {
  background: #e11d48;
  color: #ffffff;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 16px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  color: #64748b;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Main War Room Stage */
.warroom-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #faf8f5;
  padding-bottom: 40px;
}

/* Executive Header */
.stage-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 25;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.stage-header-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f1e36;
  letter-spacing: -0.01em;
}

.stage-header-subtitle {
  font-size: 12px;
  color: #64748b;
}

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

/* View Section Container */
.module-view {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1560px;
  margin: 0 auto;
  width: 100%;
}

/* Quick KPI Ribbon */
.warroom-kpi-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.ribbon-card {
  padding: 16px 18px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  transition: transform 0.2s, box-shadow 0.2s;
}

.ribbon-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.ribbon-card > div:last-child {
  min-width: 0;
  flex: 1;
}

.ribbon-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ribbon-icon-box span {
  font-size: 22px;
}

.ribbon-icon-box.blue { background: #eff6ff; color: #1d4ed8; }
.ribbon-icon-box.emerald { background: #ecfdf5; color: #059669; }
.ribbon-icon-box.amber { background: #fffbeb; color: #d97706; }
.ribbon-icon-box.purple { background: #f5f3ff; color: #7c3aed; }
.ribbon-icon-box.orange { background: #fff7ed; color: #ea580c; }

.ribbon-val {
  font-size: clamp(16px, 1.25vw, 21px);
  font-weight: 800;
  color: #0f1e36;
  line-height: 1.15;
  font-family: var(--font-sans);
  white-space: nowrap;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ribbon-val span.prefix-curr {
  font-size: 0.8em;
  font-weight: 700;
  color: #475569;
  margin-right: 2px;
}

.ribbon-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ribbon-sub {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   MODULE: CONSULTING CRM PIPELINE (LEAD TO CASH KANBAN)
   ========================================================================== */
.crm-header-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.crm-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  min-height: 520px;
}

@media (max-width: 1300px) {
  .crm-board {
    grid-template-columns: repeat(5, 280px);
  }
}

.pipeline-col {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 480px;
}

.col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.col-title {
  font-size: 12px;
  font-weight: 800;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.col-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
}

.col-total-value {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  font-family: var(--font-mono);
}

.deal-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  cursor: pointer;
}

.deal-card:hover {
  border-color: #0ea5e9;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

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

.deal-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f1e36;
  line-height: 1.3;
}

.deal-client {
  font-size: 11px;
  color: #64748b;
}

.deal-value-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #a7f3d0;
  display: inline-block;
  width: fit-content;
}

.deal-notes {
  font-size: 11px;
  color: #475569;
  line-height: 1.4;
  background: #f8fafc;
  padding: 6px 8px;
  border-radius: 6px;
}

.deal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}

.btn-advance-stage {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  background: #0f1e36;
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.2s;
}

.btn-advance-stage:hover {
  background: #1d4ed8;
}

/* ==========================================================================
   MODULE: ENTERPRISE DOCUMENT STUDIO & A4 PRINT PREVIEW
   ========================================================================== */
.doc-studio-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1100px) {
  .doc-studio-layout {
    grid-template-columns: 1fr;
  }
}

.doc-form-card {
  padding: 22px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
}

.doc-preview-wrapper {
  background: #475569;
  padding: 30px;
  border-radius: 16px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
}

.doc-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 794px;
  color: #ffffff;
}

/* A4 Realistic Document Paper */
.a4-paper {
  width: 100%;
  max-width: 794px;
  min-height: 1123px;
  background: #ffffff;
  color: #0f172a;
  padding: 50px 60px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  border-radius: 4px;
  box-sizing: border-box;
  font-family: var(--font-sans);
  position: relative;
}

.doc-letterhead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 2px solid #0f1e36;
  padding-bottom: 20px;
  margin-bottom: 26px;
}

.doc-brand-title {
  font-size: 20px;
  font-weight: 800;
  color: #0f1e36;
}

.doc-brand-sub {
  font-size: 11px;
  color: #475569;
  margin-top: 3px;
  line-height: 1.4;
}

.doc-meta-right {
  text-align: right;
  font-size: 12px;
  color: #334155;
}

.doc-number {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #1d4ed8;
  margin-bottom: 4px;
}

.doc-main-title {
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  color: #0f1e36;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.doc-main-subtitle {
  text-align: center;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 24px;
}

.doc-client-info-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 22px;
  font-size: 12px;
  line-height: 1.5;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 12px;
}

.doc-table th {
  background: #0f1e36;
  color: #ffffff;
  padding: 9px 12px;
  text-align: left;
  font-weight: 700;
}

.doc-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #1e293b;
}

.doc-table tfoot td {
  font-weight: 800;
  border-top: 2px solid #0f1e36;
  background: #f8fafc;
  font-size: 13px;
}

.doc-legal-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 11px;
  color: #78350f;
  line-height: 1.5;
  margin-bottom: 26px;
}

.doc-legal-box h4 {
  font-size: 12px;
  font-weight: 800;
  color: #b45309;
  margin-bottom: 6px;
}

.doc-signatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 40px;
}

.sig-col {
  text-align: center;
  font-size: 12px;
}

.sig-space {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  font-style: italic;
  font-size: 11px;
}

.sig-name {
  font-weight: 700;
  color: #0f1e36;
  border-top: 1px solid #64748b;
  padding-top: 6px;
  display: inline-block;
  min-width: 180px;
}

.sig-role {
  font-size: 11px;
  color: #64748b;
}

/* ==========================================================================
   MODULE: CLIENT FLEET COMMAND & SUPER ADMIN BACKDOOR
   ========================================================================== */
.fleet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}

.fleet-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.fleet-card:hover {
  transform: translateY(-2px);
  border-color: #0ea5e9;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

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

.fleet-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f1e36;
}

.fleet-entity {
  font-size: 11px;
  color: #64748b;
}

.fleet-metrics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: #f8fafc;
  padding: 12px 14px;
  border-radius: 10px;
}

.fleet-metric-item {
  display: flex;
  flex-direction: column;
}

.fleet-metric-label {
  font-size: 10px;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 700;
}

.fleet-metric-val {
  font-size: 14px;
  font-weight: 800;
  color: #0f1e36;
  font-family: var(--font-mono);
}

.fleet-tech-meta {
  font-size: 11px;
  color: #475569;
  line-height: 1.5;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: var(--font-mono);
}

.btn-backdoor {
  background: linear-gradient(135deg, #ea580c, #c2410c);
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.25);
  transition: all 0.2s ease;
}

.btn-backdoor:hover {
  background: linear-gradient(135deg, #c2410c, #9a3412);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.35);
}

/* ==========================================================================
   MODULE: MARKETING CAMPAIGNS & ATTRIBUTION
   ========================================================================== */
.marketing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.campaign-table th {
  font-size: 11px;
  text-transform: uppercase;
  color: #475569;
  font-weight: 800;
}

.pitch-kit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.pitch-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pitch-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f1e36;
}

.pitch-text-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
  color: #334155;
  line-height: 1.5;
  white-space: pre-wrap;
  font-family: var(--font-sans);
  max-height: 180px;
  overflow-y: auto;
}

/* ==========================================================================
   MODULE: COMPLAINT DESK & SERVICE MAINTENANCE (SLA TIMERS)
   ========================================================================== */
.sla-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sla-p1 {
  background: #ffe4e6;
  color: #e11d48;
  border: 1px solid #fecdd3;
  animation: pulse-urgent 1.5s infinite;
}

.sla-p2 {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.sla-p3 {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

@keyframes pulse-urgent {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.4); }
  70% { transform: scale(1.02); box-shadow: 0 0 0 6px rgba(225, 29, 72, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(225, 29, 72, 0); }
}

/* Modal Windows for New Deals / Tickets / Documents */
.warroom-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 54, 0.7);
  backdrop-filter: blur(6px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.warroom-modal-panel {
  background: #ffffff;
  border-radius: 18px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  border: 1px solid #e2e8f0;
}

.modal-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
}

.modal-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f1e36;
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.form-group-block label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.form-group-block input,
.form-group-block select,
.form-group-block textarea {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  color: #0f172a;
  outline: none;
  font-family: var(--font-sans);
}

.form-group-block input:focus,
.form-group-block select:focus,
.form-group-block textarea:focus {
  background: #ffffff;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

/* ===================================================================
   CRM ENHANCEMENTS: TOOLBAR, MINI KPIS, TABLE VIEW, & DEAL DRAWER
   ================================================================== */
.crm-controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

.crm-filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.crm-search-box {
  position: relative;
  min-width: 240px;
  max-width: 340px;
  flex: 1;
}

.crm-search-box input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  font-size: 12px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
  color: #0f172a;
}

.crm-search-box input:focus {
  background: #ffffff;
  border-color: #1d4ed8;
  box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.15);
}

.crm-search-box .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #94a3b8;
  pointer-events: none;
}

.crm-select-filter {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
  color: #334155;
  cursor: pointer;
}

.crm-view-switch {
  display: inline-flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.crm-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.crm-view-btn.active {
  background: #ffffff;
  color: #1d4ed8;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.crm-kpi-subribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.crm-sub-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.crm-sub-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.crm-sub-card-val {
  font-size: 16px;
  font-weight: 800;
  color: #0f1e36;
  white-space: nowrap;
}

.crm-sub-card-lbl {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

/* Deal Card Meta & Badges */
.deal-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.deal-meta-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.deal-meta-pill.source-google {
  background: #eff6ff;
  color: #1d4ed8;
}

.deal-meta-pill.source-meta {
  background: #fdf2f8;
  color: #db2777;
}

.deal-meta-pill.source-seo {
  background: #ecfdf5;
  color: #059669;
}

.deal-meta-pill.source-demo {
  background: #fef3c7;
  color: #d97706;
}

/* Deal Lifecycle Stepper Modal */
.deal-stepper-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  overflow-x: auto;
  gap: 8px;
}

.deal-stepper-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.15s ease;
  min-width: 90px;
}

.deal-stepper-item:hover {
  background: #e2e8f0;
}

.deal-stepper-item.active {
  background: #1d4ed8;
  color: #ffffff !important;
}

.deal-stepper-item.active .step-num {
  background: #ffffff;
  color: #1d4ed8;
}

.deal-stepper-item.active .step-name {
  color: #ffffff;
  font-weight: 800;
}

.deal-stepper-item.completed .step-num {
  background: #059669;
  color: #ffffff;
}

.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #cbd5e1;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-name {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  text-align: center;
}

.stage-guidance-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.stage-guidance-content {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.stage-guidance-title {
  font-size: 13px;
  font-weight: 800;
  color: #166534;
}

.stage-guidance-desc {
  font-size: 11px;
  color: #15803d;
  margin-top: 2px;
}

/* ===================================================================
   MARKETING CAMPAIGN ENGINE & FUNNEL BLUEPRINT STYLES
   ================================================================== */
.marketing-api-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.api-status-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.api-brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.api-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.api-title {
  font-size: 13px;
  font-weight: 800;
  color: #0f1e36;
}

.api-meta {
  font-size: 11px;
  color: #64748b;
  margin-top: 1px;
  font-family: var(--font-mono);
}

/* Funnel Strategy Blueprint */
.funnel-blueprint-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.funnel-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.funnel-step-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.funnel-step-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.funnel-step-tag {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 6px;
}

.funnel-step-title {
  font-size: 13px;
  font-weight: 800;
  color: #0f1e36;
  margin-bottom: 4px;
}

.funnel-step-desc {
  font-size: 11px;
  line-height: 1.5;
  color: #475569;
}

/* Channel Tabs */
.channel-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.channel-tab-btn {
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.channel-tab-btn.active {
  background: #0f1e36;
  border-color: #0f1e36;
  color: #ffffff;
}

/* Channel Launcher Modal */
.channel-type-toggle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.channel-pick-card {
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  background: #ffffff;
}

.channel-pick-card:hover {
  border-color: #94a3b8;
}

.channel-pick-card.active {
  border-color: #1d4ed8;
  background: #eff6ff;
}

.channel-pick-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.channel-pick-label {
  font-size: 12px;
  font-weight: 800;
  color: #0f1e36;
}

.channel-pick-sub {
  font-size: 10px;
  color: #64748b;
  margin-top: 2px;
}

.utm-preview-box {
  background: #0f172a;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 10px 12px;
  border-radius: 8px;
  word-break: break-all;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

/* Print Styles for Enterprise Documents */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .warroom-sidebar,
  .stage-header,
  .doc-preview-toolbar,
  .doc-form-card,
  .btn,
  .bg-glow,
  .sidebar-brand-box {
    display: none !important;
  }
  .warroom-shell {
    display: block !important;
  }
  .warroom-stage {
    padding: 0 !important;
    background: #ffffff !important;
  }
  .module-view {
    padding: 0 !important;
    max-width: 100% !important;
  }
  .doc-studio-layout {
    display: block !important;
  }
  .doc-preview-wrapper {
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
  }
  .a4-paper {
    box-shadow: none !important;
    padding: 20mm !important;
    max-width: 100% !important;
    min-height: auto !important;
  }
}

