/**
 * Admin Command Center Styles
 * Modern command center dashboard layout
 * The Journeyman - Admin Panel v2.0
 */

/* ========================================
   COMMAND CENTER HERO
   ======================================== */

.cc-hero {
  position: relative;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
  border: 1px solid rgba(255, 107, 43, 0.3);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 20px;
  overflow: hidden;
}

.cc-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--admin-accent), #f59e0b, var(--admin-accent));
}

.cc-hero-bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(255, 107, 43, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(6, 182, 212, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.cc-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cc-hero-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cc-hero-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--admin-accent), #C9561B);
  border-radius: 14px;
  font-size: 24px;
  color: white;
  box-shadow: 0 4px 20px rgba(255, 107, 43, 0.4);
}

.cc-hero-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cc-hero-label {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  font-weight: 600;
  color: white;
  letter-spacing: 1px;
}

.cc-hero-greeting {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.cc-hero-greeting strong {
  color: var(--admin-accent);
}

.cc-hero-metrics {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cc-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  min-width: 70px;
}

.cc-metric-value {
  font-size: 24px;
  font-weight: 700;
  color: white;
  line-height: 1;
}

.cc-metric-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.cc-metric--success .cc-metric-value {
  color: #4ade80;
}

.cc-metric--warning .cc-metric-value {
  color: #fbbf24;
}

.cc-hero-actions {
  display: flex;
  gap: 8px;
}

.cc-hero-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--admin-accent), #C9561B);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cc-hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 43, 0.4);
}

.cc-hero-btn--secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.cc-hero-btn--secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.cc-hero-btn i {
  font-size: 14px;
}

/* ========================================
   PRIMARY MODULES
   ======================================== */

.cc-modules {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.cc-module {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--admin-panel);
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: all 0.2s ease;
}

.cc-module:hover {
  border-color: var(--admin-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.cc-module-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 107, 43, 0.15);
  border-radius: 10px;
  color: var(--admin-accent);
  font-size: 18px;
  flex-shrink: 0;
}

.cc-module--green .cc-module-icon {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.cc-module--cyan .cc-module-icon {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
}

.cc-module--gold .cc-module-icon {
  background: linear-gradient(135deg, rgba(255, 107, 43, 0.2), rgba(251, 191, 36, 0.2));
  color: #fbbf24;
}

.cc-module--blue .cc-module-icon {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.cc-module--purple .cc-module-icon {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}

.cc-module-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cc-module-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--admin-text);
}

.cc-module-stat {
  font-size: 11px;
  color: var(--admin-text-muted);
}

.cc-module-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #f59e0b;
  color: #000;
  font-size: 10px;
  font-weight: 700;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cc-module-badge--danger {
  background: #ef4444;
  color: white;
}

/* ========================================
   COMMAND CENTER GRID
   ======================================== */

.cc-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
}

.cc-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ========================================
   PANELS
   ======================================== */

.cc-panel {
  background: var(--admin-panel);
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  padding: 16px;
}

.cc-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--admin-line);
}

.cc-panel-header h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--admin-text);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.cc-panel-header h3 i {
  color: var(--admin-accent);
  font-size: 13px;
}

.cc-panel-link {
  font-size: 12px;
  color: var(--admin-accent);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.cc-panel-link:hover {
  gap: 10px;
}

.cc-panel-link i {
  font-size: 10px;
}

.cc-panel-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 107, 43, 0.1);
  border: 1px solid rgba(255, 107, 43, 0.2);
  border-radius: 8px;
  color: var(--admin-accent);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.cc-panel-btn:hover {
  background: rgba(255, 107, 43, 0.2);
}

/* ========================================
   PIPELINE
   ======================================== */

.cc-panel--pipeline {
  background: linear-gradient(135deg, rgba(255, 107, 43, 0.05), transparent);
}

.cc-pipeline {
  display: flex;
  gap: 8px;
}

.cc-pipe {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.cc-pipe-bar {
  width: 100%;
  height: 80px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.cc-pipe-fill {
  width: 100%;
  min-height: 4px;
  background: linear-gradient(180deg, var(--admin-accent), #C9561B);
  border-radius: 8px 8px 0 0;
  transition: height 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cc-pipe[data-phase="P4"] .cc-pipe-fill {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
}

.cc-pipe[data-phase="P5"] .cc-pipe-fill {
  background: linear-gradient(180deg, #22c55e, #16a34a);
}

.cc-pipe-info {
  text-align: center;
}

.cc-pipe-count {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--admin-text);
}

.cc-pipe-label {
  display: block;
  font-size: 9px;
  color: var(--admin-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ========================================
   ACTIVITY FEED
   ======================================== */

.cc-activity {
  max-height: 300px;
  overflow-y: auto;
}

.cc-activity-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px;
  color: var(--admin-text-muted);
  text-align: center;
}

.cc-activity-empty i {
  font-size: 24px;
  opacity: 0.3;
}

.cc-activity-empty span {
  font-size: 12px;
}

/* ========================================
   QUICK ACTIONS
   ======================================== */

.cc-panel--actions {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.05), transparent);
}

.cc-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.cc-action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--admin-card);
  border: 1px solid var(--admin-line);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.cc-action:hover {
  border-color: var(--admin-accent);
  transform: translateX(4px);
}

.cc-action i {
  font-size: 14px;
  color: var(--admin-accent);
}

.cc-action span {
  font-size: 12px;
  font-weight: 500;
  color: var(--admin-text);
}

/* ========================================
   NAVIGATION PANEL
   ======================================== */

.cc-panel--nav {
  padding: 0;
}

.cc-panel--nav .cc-panel-header {
  padding: 14px 16px;
  margin-bottom: 0;
  cursor: pointer;
  user-select: none;
}

.cc-panel-header--toggle:hover {
  background: rgba(255, 255, 255, 0.02);
}

.cc-toggle-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--admin-line);
  border-radius: 6px;
  color: var(--admin-text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.cc-toggle-btn i {
  transition: transform 0.2s;
}

.cc-panel--nav.collapsed .cc-toggle-btn i {
  transform: rotate(-90deg);
}

/* Keep existing nav section styles */
.command-nav-sections {
  padding: 12px;
  max-height: 400px;
  overflow-y: auto;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.command-nav-sections.collapsed {
  max-height: 0;
  padding: 0 12px;
  overflow: hidden;
}

/* ========================================
   AI PANEL
   ======================================== */

.cc-panel--ai {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), transparent);
}

.cc-ai-log {
  max-height: 150px;
  overflow-y: auto;
}

.cc-ai-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px;
  color: var(--admin-text-muted);
  text-align: center;
}

.cc-ai-empty i {
  font-size: 20px;
  opacity: 0.3;
}

.cc-ai-empty span {
  font-size: 11px;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1200px) {
  .cc-modules {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .cc-hero-content {
    flex-wrap: wrap;
  }
  
  .cc-hero-metrics {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 16px;
  }
}

@media (max-width: 1024px) {
  .cc-grid {
    grid-template-columns: 1fr;
  }
  
  .cc-modules {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .cc-hero {
    padding: 20px;
  }
  
  .cc-hero-content {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .cc-hero-metrics {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .cc-metric {
    flex: 1;
    min-width: 70px;
  }
  
  .cc-modules {
    grid-template-columns: 1fr 1fr;
  }
  
  .cc-module {
    padding: 12px;
  }
  
  .cc-actions-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .cc-modules {
    grid-template-columns: 1fr;
  }
  
  .cc-hero-label {
    font-size: 16px;
  }
}

.command-nav-group {
  margin-bottom: 12px;
}

.command-nav-group:last-child {
  margin-bottom: 0;
}

.command-nav-group-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--admin-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  padding-left: 4px;
}

.command-nav-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.command-nav-row:last-child {
  margin-bottom: 0;
}

.command-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--admin-card);
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--admin-text);
  text-decoration: none;
  transition: all 0.15s ease;
  position: relative;
}

.command-nav-item:hover {
  border-color: var(--admin-accent);
  color: var(--admin-accent);
}

.command-nav-item i {
  font-size: 12px;
  color: var(--admin-text-muted);
  transition: color 0.15s;
}

.command-nav-item:hover i {
  color: var(--admin-accent);
}

.command-nav-item--featured {
  background: linear-gradient(135deg, rgba(255, 107, 43, 0.1), rgba(168, 85, 247, 0.1));
  border-color: rgba(255, 107, 43, 0.3);
}

.command-nav-item--featured i {
  color: #ff6b2b;
}

.command-nav-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 9px;
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.command-nav-badge.warning {
  background: #f59e0b;
  color: white;
}

.command-nav-badge.danger {
  background: #ef4444;
  color: white;
}
