/* ═══════════════════════════════════════════════════════════════════
   COMMAND CENTER — Futuristic Neon Dashboard
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Page Shell ─────────────────────────────────────────────────── */
.cc-page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--space-4);
  max-width: 1400px;
  margin: 0 auto;
  overflow-x: hidden;
}

/* Grid overlay */
.cc-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(57, 255, 20, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 255, 20, 0.02) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: 0;
}

/* Scan-line effect */
.cc-page::after {
  content: '';
  position: fixed;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(57, 255, 20, 0.3), rgba(124, 58, 237, 0.3), transparent);
  animation: cc-scan-line 8s linear infinite;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.5;
}

@keyframes cc-scan-line {
  0% { top: -2px; }
  100% { top: 100vh; }
}

/* ─── Header ─────────────────────────────────────────────────────── */
.cc-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
  gap: var(--space-3);
}

.cc-header__left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.cc-back-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--bg-glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.cc-back-btn:hover {
  color: var(--neon-green);
  border-color: rgba(57, 255, 20, 0.3);
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.15);
}

.cc-title {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--neon-green), #A78BFA, var(--neon-green));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: cc-title-shift 6s ease infinite;
}

@keyframes cc-title-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.cc-subtitle {
  font-size: var(--text-xs);
  color: var(--text-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

.cc-mock-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ─── Live Indicator ─────────────────────────────────────────────── */
.cc-header__right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.cc-live-indicator {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  background: rgba(57, 255, 20, 0.06);
  border: 1px solid rgba(57, 255, 20, 0.15);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.cc-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-green);
  box-shadow: 0 0 8px rgba(57, 255, 20, 0.6);
  animation: cc-live-pulse 2s ease-in-out infinite;
}

.cc-live-dot--paused {
  background: var(--text-dim);
  box-shadow: none;
  animation: none;
}

@keyframes cc-live-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(57, 255, 20, 0.6); }
  50% { opacity: 0.4; box-shadow: 0 0 4px rgba(57, 255, 20, 0.2); }
}

.cc-live-text {
  color: var(--neon-green);
  letter-spacing: 0.05em;
  min-width: 70px;
}

.cc-live-dot--paused + .cc-live-text {
  color: var(--text-dim);
}

.cc-live-toggle {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.7rem;
  padding: 2px 4px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  line-height: 1;
}
.cc-live-toggle:hover {
  color: var(--neon-green);
  background: rgba(57, 255, 20, 0.1);
}

/* ─── KPI Flash Animation ────────────────────────────────────────── */
.cc-kpi-card--updated {
  border-color: rgba(57, 255, 20, 0.5) !important;
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.15), inset 0 0 20px rgba(57, 255, 20, 0.05) !important;
  animation: cc-kpi-flash 1.5s ease-out !important;
}

@keyframes cc-kpi-flash {
  0% { border-color: rgba(57, 255, 20, 0.7); box-shadow: 0 0 30px rgba(57, 255, 20, 0.25); }
  100% { border-color: rgba(57, 255, 20, 0.12); box-shadow: none; }
}

/* ─── Date Range Selector ────────────────────────────────────────── */
.cc-range-selector {
  display: flex;
  gap: 2px;
  background: var(--bg-glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 2px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.cc-range-btn {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-dim);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.cc-range-btn:hover { color: var(--text-secondary); }
.cc-range-btn.active {
  background: rgba(57, 255, 20, 0.15);
  color: var(--neon-green);
  text-shadow: 0 0 8px rgba(57, 255, 20, 0.5);
}

/* ─── Tabs ───────────────────────────────────────────────────────── */
.cc-tabs {
  position: relative;
  z-index: 2;
  display: flex;
  gap: var(--space-1);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.cc-tab {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-family: var(--font-mono);
  color: var(--text-dim);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.cc-tab:hover {
  color: var(--text-secondary);
  background: var(--bg-glass);
}
.cc-tab.active {
  color: var(--neon-green);
  background: rgba(57, 255, 20, 0.08);
  border-color: rgba(57, 255, 20, 0.2);
  border-bottom-color: transparent;
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.4);
  box-shadow: 0 -2px 12px rgba(57, 255, 20, 0.1);
}

/* ─── Content Area ───────────────────────────────────────────────── */
.cc-content {
  position: relative;
  z-index: 2;
  animation: cc-fade-in 0.4s ease;
}

@keyframes cc-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── KPI Cards Grid ─────────────────────────────────────────────── */
.cc-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.cc-kpi-card {
  position: relative;
  padding: var(--space-4) var(--space-5);
  background: rgba(10, 10, 15, 0.7);
  -webkit-backdrop-filter: blur(var(--blur-glass));
  backdrop-filter: blur(var(--blur-glass));
  border: 1px solid rgba(57, 255, 20, 0.12);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  animation: cc-card-enter 0.5s ease both;
}

.cc-kpi-card:nth-child(1) { animation-delay: 0.05s; }
.cc-kpi-card:nth-child(2) { animation-delay: 0.1s; }
.cc-kpi-card:nth-child(3) { animation-delay: 0.15s; }
.cc-kpi-card:nth-child(4) { animation-delay: 0.2s; }
.cc-kpi-card:nth-child(5) { animation-delay: 0.25s; }
.cc-kpi-card:nth-child(6) { animation-delay: 0.3s; }

@keyframes cc-card-enter {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Top edge glow */
.cc-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-green), transparent);
  opacity: 0.6;
}

/* Pulse animation */
.cc-kpi-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 20px rgba(57, 255, 20, 0.03);
  animation: cc-pulse-border 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes cc-pulse-border {
  0%, 100% { box-shadow: inset 0 0 10px rgba(57, 255, 20, 0.02), 0 0 4px rgba(57, 255, 20, 0.05); }
  50% { box-shadow: inset 0 0 20px rgba(57, 255, 20, 0.05), 0 0 12px rgba(57, 255, 20, 0.1); }
}

.cc-kpi-card:hover {
  border-color: rgba(57, 255, 20, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(57, 255, 20, 0.1);
}

.cc-kpi-card__label {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-2);
}

.cc-kpi-card__value {
  font-size: var(--text-3xl);
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
  text-shadow: 0 0 20px rgba(57, 255, 20, 0.2);
  line-height: 1.1;
}

.cc-kpi-card__value--green { color: var(--neon-green); text-shadow: 0 0 20px rgba(57, 255, 20, 0.4); }
.cc-kpi-card__value--purple { color: var(--purple-400); text-shadow: 0 0 20px rgba(167, 139, 250, 0.4); }
.cc-kpi-card__value--amber { color: #F59E0B; text-shadow: 0 0 20px rgba(245, 158, 11, 0.4); }

.cc-kpi-card__sub {
  font-size: var(--text-xs);
  color: var(--text-dim);
  margin-top: var(--space-1);
  font-family: var(--font-mono);
}

.cc-kpi-card__trend {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: var(--text-xs);
  margin-top: var(--space-1);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}
.cc-kpi-card__trend--up { color: var(--success); background: rgba(16, 185, 129, 0.1); }
.cc-kpi-card__trend--down { color: var(--error); background: rgba(239, 68, 68, 0.1); }

/* ─── Charts Grid ────────────────────────────────────────────────── */
.cc-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.cc-chart-card {
  background: rgba(10, 10, 15, 0.7);
  -webkit-backdrop-filter: blur(var(--blur-glass));
  backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  animation: cc-card-enter 0.5s ease both;
  animation-delay: 0.35s;
}

.cc-chart-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.cc-chart-card__title {
  font-size: var(--text-sm);
  font-family: var(--font-mono);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cc-chart-wrap {
  position: relative;
  height: 220px;
}

.cc-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ─── Business Share Layout ──────────────────────────────────────── */
.cc-share-layout {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: 200px;
}

.cc-share-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  max-height: 220px;
}

.cc-share-legend__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}
.cc-share-legend__item:hover {
  background: rgba(57, 255, 20, 0.04);
}

.cc-share-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cc-share-legend__name {
  flex: 1;
  font-size: var(--text-xs);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cc-share-legend__val {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-dim);
  white-space: nowrap;
}

.cc-share-donut {
  width: 160px;
  height: 160px;
  flex-shrink: 0;
}
.cc-share-donut canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ─── Activity Feed ──────────────────────────────────────────────── */
.cc-activity {
  background: rgba(10, 10, 15, 0.7);
  -webkit-backdrop-filter: blur(var(--blur-glass));
  backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-5);
}

.cc-activity__title {
  font-size: var(--text-sm);
  font-family: var(--font-mono);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-3);
}

.cc-activity__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.cc-activity__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  background: rgba(124, 58, 237, 0.04);
  border-left: 2px solid var(--glass-border);
  transition: all var(--transition-fast);
}
.cc-activity__item:hover {
  background: rgba(124, 58, 237, 0.08);
  border-left-color: var(--neon-green);
}

.cc-activity__item[data-biz="rush-ride"] { border-left-color: rgba(57, 255, 20, 0.4); }
.cc-activity__item[data-biz="xazai"] { border-left-color: rgba(245, 158, 11, 0.4); }
.cc-activity__item[data-biz="accios-core"] { border-left-color: rgba(124, 58, 237, 0.4); }

.cc-activity__icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  flex-shrink: 0;
}

.cc-activity__text {
  flex: 1;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.cc-activity__time {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-dim);
  white-space: nowrap;
}

/* ─── Business Badges ────────────────────────────────────────────── */
.cc-biz-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  border-radius: var(--radius-full);
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.cc-biz-badge--accios { background: rgba(124, 58, 237, 0.15); color: #A78BFA; border: 1px solid rgba(124, 58, 237, 0.25); }
.cc-biz-badge--rush { background: rgba(57, 255, 20, 0.1); color: #39FF14; border: 1px solid rgba(57, 255, 20, 0.2); }
.cc-biz-badge--xazai { background: rgba(139, 92, 246, 0.1); color: #8B5CF6; border: 1px solid rgba(139, 92, 246, 0.2); }
.cc-biz-badge--colson { background: rgba(236, 72, 153, 0.1); color: #EC4899; border: 1px solid rgba(236, 72, 153, 0.2); }
.cc-biz-badge--resultados { background: rgba(6, 182, 212, 0.1); color: #06B6D4; border: 1px solid rgba(6, 182, 212, 0.2); }
.cc-biz-badge--cristian { background: rgba(139, 92, 246, 0.1); color: #8B5CF6; border: 1px solid rgba(139, 92, 246, 0.2); }
.cc-biz-badge--tabares { background: rgba(239, 68, 68, 0.1); color: #EF4444; border: 1px solid rgba(239, 68, 68, 0.2); }
.cc-biz-badge--cakefit { background: rgba(249, 115, 22, 0.1); color: #F97316; border: 1px solid rgba(249, 115, 22, 0.2); }
.cc-biz-badge--glowin { background: rgba(16, 185, 129, 0.1); color: #10B981; border: 1px solid rgba(16, 185, 129, 0.2); }
.cc-biz-badge--hechizos { background: rgba(217, 70, 239, 0.1); color: #D946EF; border: 1px solid rgba(217, 70, 239, 0.2); }
.cc-biz-badge--salon507 { background: rgba(244, 63, 94, 0.1); color: #F43F5E; border: 1px solid rgba(244, 63, 94, 0.2); }
.cc-biz-badge--tcp { background: rgba(14, 165, 233, 0.1); color: #0EA5E9; border: 1px solid rgba(14, 165, 233, 0.2); }
.cc-biz-badge--janelle { background: rgba(132, 204, 22, 0.1); color: #84CC16; border: 1px solid rgba(132, 204, 22, 0.2); }

/* ─── Users Table ────────────────────────────────────────────────── */
.cc-users-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.cc-search {
  flex: 1;
  min-width: 200px;
  padding: var(--space-2) var(--space-3);
  padding-left: 36px;
  background: var(--bg-glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: all var(--transition-fast);
}
.cc-search:focus {
  outline: none;
  border-color: var(--neon-green);
  box-shadow: 0 0 0 3px rgba(57, 255, 20, 0.1);
}
.cc-search::placeholder { color: var(--text-dim); }

.cc-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.cc-search-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.cc-filters {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.cc-filter-chip {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.cc-filter-chip:hover { color: var(--text-secondary); border-color: var(--text-dim); }
.cc-filter-chip.active {
  color: var(--neon-green);
  background: rgba(57, 255, 20, 0.08);
  border-color: rgba(57, 255, 20, 0.3);
}

.cc-table-wrap {
  background: rgba(10, 10, 15, 0.7);
  -webkit-backdrop-filter: blur(var(--blur-glass));
  backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cc-table {
  width: 100%;
  border-collapse: collapse;
}

.cc-table th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(57, 255, 20, 0.03);
  border-bottom: 1px solid var(--glass-border);
}

.cc-table td {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.cc-table tr {
  transition: all var(--transition-fast);
  cursor: pointer;
}
.cc-table tbody tr:hover {
  background: rgba(57, 255, 20, 0.04);
}
.cc-table tbody tr:hover td {
  color: var(--text-primary);
}

.cc-table__name {
  font-weight: 500;
  color: var(--text-primary);
}

.cc-table__phone {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-dim);
}

.cc-table__badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.cc-table__amount {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--neon-green);
}

.cc-table__date {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-dim);
}

/* Pagination */
.cc-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3);
  border-top: 1px solid var(--border-subtle);
}

.cc-pagination__btn {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-secondary);
  background: var(--bg-glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.cc-pagination__btn:hover:not(:disabled) {
  border-color: var(--neon-green);
  color: var(--neon-green);
}
.cc-pagination__btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.cc-pagination__info {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-dim);
}

/* ─── Profile Panel ──────────────────────────────────────────────── */
.cc-profile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 1;
  animation: cc-overlay-in 0.3s ease;
}

@keyframes cc-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cc-profile-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(500px, 90vw);
  height: 100vh;
  background: var(--bg-secondary);
  border-left: 1px solid var(--glass-border);
  overflow-y: auto;
  z-index: 2;
  animation: cc-panel-slide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
}

@keyframes cc-panel-slide {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.cc-profile-header {
  padding: var(--space-5);
  background: linear-gradient(135deg, rgba(57, 255, 20, 0.05), rgba(124, 58, 237, 0.1));
  border-bottom: 1px solid var(--glass-border);
}

.cc-profile-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.cc-profile-close:hover { color: var(--error); border-color: rgba(239, 68, 68, 0.3); }

/* Avatar + name row */
.cc-profile-avatar-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.cc-profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(57, 255, 20, 0.3);
  flex-shrink: 0;
}

.cc-profile-avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.4), rgba(57, 255, 20, 0.2));
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.05em;
}

.cc-profile-email {
  font-size: var(--text-xs);
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.cc-profile-name {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.cc-profile-phone {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-dim);
  margin-bottom: var(--space-3);
}

.cc-profile-stats {
  display: flex;
  gap: var(--space-4);
}

.cc-profile-stat {
  text-align: center;
}
.cc-profile-stat__value {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--neon-green);
}
.cc-profile-stat__label {
  font-size: var(--text-xs);
  color: var(--text-dim);
  text-transform: uppercase;
}

/* ─── Personal details in header card ──────────────────── */
.cc-profile-personal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255,255,255,0.06);
}
.cc-profile-detail {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: var(--text-xs);
}
.cc-profile-detail__icon {
  font-size: 0.8rem;
}
.cc-profile-detail__text {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

/* ─── Profile badges row ───────────────────────────────── */
.cc-profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: var(--space-3) 0;
}

/* ─── Expandable Total Spent ───────────────────────────── */
.cc-profile-stat--expandable {
  cursor: pointer;
  position: relative;
}
.cc-profile-stat--expandable .cc-profile-stat__label { transition: color var(--transition-fast); }
.cc-profile-stat--expandable:hover .cc-profile-stat__label { color: var(--neon-green); }
.cc-spent-breakdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  background: rgba(10, 10, 15, 0.95);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 0 var(--space-2);
  z-index: 10;
  pointer-events: none;
}
.cc-profile-stat--expandable.expanded .cc-spent-breakdown {
  max-height: 300px;
  padding: var(--space-2);
  opacity: 1;
  pointer-events: auto;
}
.cc-spent-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  font-size: 0.7rem;
}
.cc-spent-row__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cc-spent-row__name {
  flex: 1;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cc-spent-row__amount {
  font-family: var(--font-mono);
  color: var(--neon-green);
  font-weight: 600;
  flex-shrink: 0;
}

/* ─── Merge button ─────────────────────────────────────── */
.cc-profile-merge-btn {
  position: absolute;
  top: var(--space-3);
  right: calc(var(--space-3) + 40px);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: var(--radius-sm);
  color: #A78BFA;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cc-profile-merge-btn:hover {
  background: rgba(124, 58, 237, 0.2);
  border-color: rgba(124, 58, 237, 0.5);
}

/* ─── Merge overlay ────────────────────────────────────── */
.cc-merge-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.95);
  z-index: 5;
  display: flex;
  flex-direction: column;
  padding: var(--space-4);
  animation: cc-fade-in 0.2s ease;
}
.cc-merge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
}
.cc-merge-title {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--neon-green);
}
.cc-merge-close {
  background: none;
  border: 1px solid var(--glass-border);
  color: var(--text-dim);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 0.8rem;
}
.cc-merge-info {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: var(--space-3);
}
.cc-merge-info strong { color: var(--text-primary); }
.cc-merge-search {
  width: 100%;
  padding: 8px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-family: var(--font-mono);
  outline: none;
  transition: border-color var(--transition-fast);
}
.cc-merge-search:focus { border-color: var(--neon-green); }
.cc-merge-results {
  flex: 1;
  overflow-y: auto;
  margin-top: var(--space-3);
}
.cc-merge-result {
  padding: 10px 12px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.cc-merge-result:hover {
  border-color: rgba(124, 58, 237, 0.5);
  background: rgba(124, 58, 237, 0.05);
}
.cc-merge-result__name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: var(--text-sm);
}
.cc-merge-result__detail {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  margin-top: 2px;
}
.cc-merge-result__badges {
  margin-top: 4px;
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

/* ─── Merge confirm ────────────────────────────────────── */
.cc-merge-confirm { padding: var(--space-3) 0; }
.cc-merge-confirm__title {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: var(--space-3);
}
.cc-merge-confirm__row {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  align-items: stretch;
}
.cc-merge-confirm__card {
  flex: 1;
  padding: var(--space-3);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-primary);
}
.cc-merge-confirm__actions {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  margin-top: var(--space-4);
}
.cc-merge-btn {
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.cc-merge-btn--cancel {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-dim);
}
.cc-merge-btn--cancel:hover { border-color: var(--text-secondary); color: var(--text-secondary); }
.cc-merge-btn--confirm {
  background: rgba(57, 255, 20, 0.1);
  border: 1px solid rgba(57, 255, 20, 0.3);
  color: var(--neon-green);
}
.cc-merge-btn--confirm:hover { background: rgba(57, 255, 20, 0.2); border-color: var(--neon-green); }
.cc-merge-btn--confirm:disabled { opacity: 0.5; cursor: not-allowed; }

.cc-profile-body {
  padding: var(--space-4);
}

.cc-profile-section {
  margin-bottom: var(--space-4);
}

.cc-profile-section__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
}
.cc-profile-section__title--accios { color: #A78BFA; }
.cc-profile-section__title--rush { color: #39FF14; }
.cc-profile-section__title--xazai { color: #8B5CF6; }
.cc-profile-section__title--colson { color: #EC4899; }
.cc-profile-section__title--resultados { color: #06B6D4; }
.cc-profile-section__title--cristian { color: #8B5CF6; }
.cc-profile-section__title--tabares { color: #EF4444; }
.cc-profile-section__title--cakefit { color: #F97316; }
.cc-profile-section__title--glowin { color: #10B981; }
.cc-profile-section__title--hechizos { color: #D946EF; }
.cc-profile-section__title--salon507 { color: #F43F5E; }
.cc-profile-section__title--tcp { color: #0EA5E9; }
.cc-profile-section__title--janelle { color: #84CC16; }
.cc-profile-section__title--inactive { color: var(--text-dim); }

.cc-profile-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-1);
  border-radius: var(--radius-sm);
  background: rgba(124, 58, 237, 0.03);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.cc-profile-item__date {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-dim);
}
.cc-profile-item__amount {
  font-family: var(--font-mono);
  font-weight: 600;
}

/* ─── Dossier / Expediente Fields ────────────────────────────────── */
.cc-dossier-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}

.cc-dossier-field {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: rgba(124, 58, 237, 0.03);
  border-left: 2px solid rgba(57, 255, 20, 0.15);
}

.cc-dossier-field__label {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.cc-dossier-field__value {
  font-size: var(--text-sm);
  color: var(--text-primary);
  word-break: break-word;
}

.cc-dossier-src {
  display: inline-flex;
  padding: 1px 4px;
  font-size: 0.55rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  background: rgba(124, 58, 237, 0.1);
  color: var(--text-dim);
}
.cc-dossier-src--accios { background: rgba(124, 58, 237, 0.15); color: #A78BFA; }
.cc-dossier-src--rush { background: rgba(57, 255, 20, 0.1); color: #39FF14; }
.cc-dossier-src--xazai { background: rgba(139, 92, 246, 0.1); color: #8B5CF6; }
.cc-dossier-src--colson { background: rgba(236, 72, 153, 0.1); color: #EC4899; }
.cc-dossier-src--resultados { background: rgba(6, 182, 212, 0.1); color: #06B6D4; }
.cc-dossier-src--cristian { background: rgba(139, 92, 246, 0.1); color: #8B5CF6; }
.cc-dossier-src--tabares { background: rgba(239, 68, 68, 0.1); color: #EF4444; }
.cc-dossier-src--cakefit { background: rgba(249, 115, 22, 0.1); color: #F97316; }
.cc-dossier-src--glowin { background: rgba(16, 185, 129, 0.1); color: #10B981; }
.cc-dossier-src--hechizos { background: rgba(217, 70, 239, 0.1); color: #D946EF; }
.cc-dossier-src--salon507 { background: rgba(244, 63, 94, 0.1); color: #F43F5E; }
.cc-dossier-src--tcp { background: rgba(14, 165, 233, 0.1); color: #0EA5E9; }
.cc-dossier-src--janelle { background: rgba(132, 204, 22, 0.1); color: #84CC16; }

.cc-dossier-tag {
  display: inline-flex;
  padding: 1px 6px;
  font-size: var(--text-xs);
  border-radius: var(--radius-full);
  background: rgba(124, 58, 237, 0.08);
  color: var(--text-secondary);
  border: 1px solid rgba(124, 58, 237, 0.15);
  margin: 1px 2px;
}

.cc-dossier-subfield {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.cc-dossier-img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--glass-border);
}

/* Timeline */
.cc-timeline {
  position: relative;
  padding-left: var(--space-5);
}
.cc-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--neon-green), var(--glass-border), transparent);
}

.cc-timeline__item {
  position: relative;
  padding-bottom: var(--space-3);
}
.cc-timeline__item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-5) + 4px);
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--glass-border);
}
.cc-timeline__item[data-biz="rush-ride"]::before { border-color: #39FF14; box-shadow: 0 0 6px rgba(57, 255, 20, 0.4); }
.cc-timeline__item[data-biz="xazai"]::before { border-color: #8B5CF6; box-shadow: 0 0 6px rgba(139, 92, 246, 0.4); }
.cc-timeline__item[data-biz="accios-core"]::before { border-color: #A78BFA; box-shadow: 0 0 6px rgba(167, 139, 250, 0.4); }

.cc-timeline__date {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-dim);
}
.cc-timeline__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* ─── Loading State ──────────────────────────────────────────────── */
.cc-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: var(--space-3);
}

.cc-loading__spinner {
  width: 40px;
  height: 40px;
  border: 2px solid var(--glass-border);
  border-top-color: var(--neon-green);
  border-radius: 50%;
  animation: cc-spin 0.8s linear infinite;
}

@keyframes cc-spin {
  to { transform: rotate(360deg); }
}

.cc-loading__text {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

/* ─── Access Denied ──────────────────────────────────────────────── */
.cc-denied {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: var(--space-4);
  text-align: center;
}
.cc-denied__icon {
  font-size: 3rem;
  opacity: 0.5;
}
.cc-denied__title {
  font-size: var(--text-xl);
  font-family: var(--font-mono);
  color: var(--error);
}
.cc-denied__text {
  font-size: var(--text-sm);
  color: var(--text-dim);
}

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .cc-page { padding: var(--space-3); }
  .cc-title { font-size: var(--text-lg); }
  .cc-kpi-grid { grid-template-columns: 1fr 1fr; gap: var(--space-3); }
  .cc-kpi-card { padding: var(--space-3); }
  .cc-kpi-card__value { font-size: var(--text-xl); }
  .cc-charts-grid { grid-template-columns: 1fr; }
  .cc-share-layout { flex-direction: column-reverse; }
  .cc-share-donut { width: 120px; height: 120px; }
  .cc-share-legend { max-height: none; }
  .cc-chart-wrap { height: 180px; }
  .cc-header { flex-direction: column; align-items: flex-start; }
  .cc-header__right { width: 100%; justify-content: space-between; }
  .cc-users-header { flex-direction: column; }
  .cc-search-wrap { width: 100%; }
  .cc-filters { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .cc-table th:nth-child(4), .cc-table td:nth-child(4) { display: none; }
  .cc-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .cc-table { min-width: 580px; }
  .cc-profile-panel { width: 100vw; }
  .cc-dossier-grid { grid-template-columns: 1fr; }

  /* ─── Profile mobile premium ──────────────────────── */
  .cc-profile-header { padding: var(--space-3) var(--space-4); }
  .cc-profile-avatar-row { gap: var(--space-3); }
  .cc-profile-avatar { width: 44px; height: 44px; font-size: var(--text-sm); }
  .cc-profile-name { font-size: var(--text-lg); }
  .cc-profile-phone, .cc-profile-email { font-size: 0.7rem; }

  .cc-profile-badges { justify-content: center; }
  .cc-profile-stats { justify-content: center; gap: var(--space-3); }
  .cc-profile-stat__value { font-size: var(--text-base); }
  .cc-profile-stat__label { font-size: 0.6rem; }

  .cc-profile-personal { justify-content: center; gap: 4px; }
  .cc-profile-detail { padding: 3px 8px; }
  .cc-profile-detail__text { font-size: 0.6rem; }
  .cc-profile-detail__icon { font-size: 0.7rem; }

  .cc-profile-merge-btn { right: calc(var(--space-3) + 32px); font-size: 0.55rem; padding: 3px 6px; }
  .cc-spent-breakdown { width: 180px; }
}

@media (max-width: 480px) {
  .cc-kpi-grid { grid-template-columns: 1fr; }
  .cc-table th:nth-child(3), .cc-table td:nth-child(3) { display: none; }
}

/* ─── Reduced motion ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .cc-page::after { animation: none; display: none; }
  .cc-kpi-card::after { animation: none; }
  .cc-kpi-card { animation-duration: 0.01ms; }
  .cc-chart-card { animation-duration: 0.01ms; }
  .cc-title { animation: none; }
}
