/* ========================================
   DASHBOARD SPECIFIC STYLES
   ======================================== */

/* === SIDEBAR FOOTER === */
.sidebar-footer {
  margin-top: auto;
  padding: var(--spacing-lg);
  border-top: 1px solid var(--border-color);
}

.user-card {
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  border: 1px solid var(--border-color);
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-xl);
}

.user-name {
  font-weight: 600;
  font-size: var(--text-base);
}

.user-level {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.user-xp-bar {
  height: 6px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  margin-top: var(--spacing-md);
  overflow: hidden;
}

.user-xp-fill {
  height: 100%;
  background: var(--gradient-primary);
  transition: width var(--transition-slow);
}

.user-stats {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.user-stat {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* === LOGO === */
.logo-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl);
  box-shadow: var(--shadow-neon-pink);
}

/* === PAGE HEADER === */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-2xl);
  padding-bottom: var(--spacing-xl);
  border-bottom: 1px solid var(--border-color);
}

.page-title {
  font-size: var(--text-4xl);
  margin-bottom: var(--spacing-xs);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: var(--text-base);
}

/* === STATUS INDICATOR === */
.status-indicator {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-green);
  box-shadow: 0 0 10px var(--neon-green);
  animation: pulse 2s infinite;
}

.status-indicator.disconnected .status-dot {
  background: var(--neon-orange);
  box-shadow: 0 0 10px var(--neon-orange);
}

.status-indicator.error .status-dot {
  background: var(--neon-pink);
  box-shadow: 0 0 10px var(--neon-pink);
}

/* === PAGE VIEWS === */
.page-view {
  display: none;
}

.page-view.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

/* === STAT TRENDS === */
.stat-trend {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  margin-top: var(--spacing-sm);
  padding-top: var(--spacing-sm);
  border-top: 1px solid var(--border-color);
  font-size: var(--text-sm);
  font-weight: 600;
}

.stat-trend.positive {
  color: var(--neon-green);
}

.stat-trend.negative {
  color: var(--neon-pink);
}

/* === KPI CARDS === */
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.kpi-icon {
  font-size: var(--text-4xl);
  margin-bottom: var(--spacing-md);
}

.kpi-value {
  font-size: var(--text-5xl);
  font-weight: 700;
  font-family: var(--font-display);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--spacing-xs);
}

.kpi-label {
  color: var(--text-primary);
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

.kpi-period {
  color: var(--text-tertiary);
  font-size: var(--text-sm);
}

/* === CONVERSATIONS LIST === */
.conversation-item {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.conversation-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-hover);
  transform: translateX(4px);
}

.conversation-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  flex-shrink: 0;
}

.conversation-content {
  flex: 1;
  min-width: 0;
}

.conversation-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--spacing-xs);
}

.conversation-name {
  font-weight: 600;
  font-size: var(--text-base);
}

.conversation-time {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.conversation-preview {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-meta {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-xs);
}

/* === LOADING STATE === */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-2xl);
  color: var(--text-secondary);
}

.loading-state .spinner {
  margin-bottom: var(--spacing-lg);
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: var(--spacing-2xl);
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: var(--text-5xl);
  margin-bottom: var(--spacing-lg);
  opacity: 0.5;
}

.empty-state-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.empty-state-description {
  margin-bottom: var(--spacing-lg);
}

/* === TOGGLE SWITCH === */
.toggle-switch {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  cursor: pointer;
}

.toggle-switch input {
  position: relative;
  width: 48px;
  height: 24px;
  appearance: none;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
}

.toggle-switch input::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text-secondary);
  top: 2px;
  left: 2px;
  transition: all var(--transition-base);
}

.toggle-switch input:checked {
  background: var(--gradient-primary);
  border-color: transparent;
}

.toggle-switch input:checked::before {
  transform: translateX(24px);
  background: white;
}

.toggle-label {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

/* === SYSTEM STATUS === */
.system-status-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.system-status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

/* === CHARTS === */
canvas {
  max-height: 300px;
}

/* === MODAL === */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 14, 26, 0.9);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.modal.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--spacing-2xl);
  max-width: 600px;
  width: calc(100% - 2rem);
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform var(--transition-base);
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  font-family: var(--font-display);
}

/* === TOAST NOTIFICATIONS === */
.toast-container {
  position: fixed;
  bottom: var(--spacing-xl);
  right: var(--spacing-xl);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  max-width: 400px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--neon-pink);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md) var(--spacing-lg);
  box-shadow: var(--shadow-xl);
  animation: slideInRight 0.3s ease-out;
}

.toast.success {
  border-left-color: var(--neon-green);
}

.toast.warning {
  border-left-color: var(--neon-yellow);
}

.toast.error {
  border-left-color: var(--neon-pink);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);
  }
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-card);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-color-hover);
}

/* === ANIMATIONS === */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in {
  animation: slideIn 0.5s ease-out;
}

/* === MISSION CARD (Gamification) === */
.mission-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--neon-pink);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  transition: all var(--transition-base);
}

.mission-card:hover {
  transform: translateX(4px);
  border-left-color: var(--neon-cyan);
  box-shadow: var(--shadow-lg);
}

.mission-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--spacing-md);
}

.mission-title {
  font-weight: 600;
  font-size: var(--text-base);
  margin-bottom: var(--spacing-xs);
}

.mission-xp {
  background: var(--gradient-success);
  color: white;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 700;
}

.mission-description {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-bottom: var(--spacing-md);
}

.mission-progress {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.mission-progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  transition: width var(--transition-slow);
}

/* === ZONE DE FALHA (Failure Zone) === */
.failure-zone {
  background: linear-gradient(135deg, rgba(255, 0, 110, 0.1) 0%, rgba(179, 0, 255, 0.1) 100%);
  border: 2px solid var(--neon-pink);
  border-radius: var(--radius-xl);
  padding: var(--spacing-2xl);
  text-align: center;
  margin: var(--spacing-xl) 0;
}

.failure-zone-title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 900;
  text-transform: uppercase;
  background: var(--gradient-danger);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--spacing-md);
  text-shadow: 0 0 20px rgba(255, 0, 110, 0.5);
}

.failure-zone-subtitle {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xl);
}

.failure-quote {
  font-style: italic;
  color: var(--text-primary);
  font-size: var(--text-lg);
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-lg);
  border-left: 3px solid var(--neon-yellow);
  background: rgba(255, 237, 0, 0.05);
  border-radius: var(--radius-md);
}

.failure-author {
  color: var(--neon-yellow);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* === EDIT BUTTONS === */
.btn-edit, .btn-delete {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
}

.btn-edit:hover {
  background: rgba(0, 245, 255, 0.1);
  transform: scale(1.1);
}

.btn-delete:hover {
  background: rgba(255, 0, 110, 0.1);
  transform: scale(1.1);
}
