/* JET Monitor - Dashboard Styles */
/* Grupo JET - Design System v2.0 */

:root {
  /* Cores Principais */
  --jet-primary: #FF6600;
  --jet-dark: #1a1f2e;
  --jet-darker: #13161f;
  --jet-gray: #2d3748;
  --jet-gray-light: #4a5568;
  --jet-gray-lighter: #718096;
  
  /* Status Colors */
  --status-success: #10b981;
  --status-warning: #f59e0b;
  --status-error: #ef4444;
  --status-info: #3b82f6;
  
  /* Gradients */
  --gradient-main: linear-gradient(135deg, #1a1f2e 0%, #13161f 100%);
  --gradient-card: linear-gradient(145deg, #ffffff 0%, #f9fafb 100%);
  --gradient-accent: linear-gradient(135deg, #FF6600 0%, #ff8833 100%);
}

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

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f5f7fa;
  color: #1a202c;
  line-height: 1.6;
}

/* Header Styles */
.dashboard-header {
  background: var(--gradient-main);
  border-bottom: 3px solid var(--jet-primary);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-logo img {
  height: 48px;
  width: auto;
}

.header-title {
  border-left: 2px solid var(--jet-gray-light);
  padding-left: 1.5rem;
}

.header-title h1 {
  color: var(--jet-primary);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.header-title p {
  color: #a0aec0;
  font-size: 0.875rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-accent);
  color: white;
  box-shadow: 0 2px 4px rgba(255, 102, 0, 0.2);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(255, 102, 0, 0.3);
}

.btn-success {
  background: var(--status-success);
  color: white;
}

.btn-success:hover {
  background: #059669;
}

.btn-info {
  background: var(--status-info);
  color: white;
}

.btn-info:hover {
  background: #2563eb;
}

/* Main Container */
.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

/* Stats Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--gradient-card);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-left: 4px solid;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(30%, -30%);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.stat-card.danger { border-left-color: var(--status-error); }
.stat-card.warning { border-left-color: var(--status-warning); }
.stat-card.info { border-left-color: var(--status-info); }
.stat-card.success { border-left-color: var(--status-success); }
.stat-card.primary { border-left-color: var(--jet-primary); }

.stat-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-info h3 {
  color: var(--jet-gray-lighter);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.stat-info .stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}

.stat-icon {
  font-size: 3rem;
  opacity: 0.3;
}

.stat-card.danger .stat-value { color: var(--status-error); }
.stat-card.warning .stat-value { color: var(--status-warning); }
.stat-card.info .stat-value { color: var(--status-info); }
.stat-card.success .stat-value { color: var(--status-success); }
.stat-card.primary .stat-value { color: var(--jet-primary); }

/* Charts Grid */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.chart-card {
  background: var(--jet-dark);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--jet-gray);
}

.chart-card.full-width {
  grid-column: 1 / -1;
}

.chart-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--jet-gray);
}

.chart-header i {
  color: var(--jet-primary);
  font-size: 1.25rem;
}

.chart-header h3 {
  color: white;
  font-size: 1.125rem;
  font-weight: 600;
}

.chart-container {
  position: relative;
  height: 250px;
}

.chart-container.tall {
  height: 150px;
}

/* Tabs Navigation */
.tabs-nav {
  background: white;
  border-radius: 1rem;
  padding: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tab-btn {
  flex: 1;
  min-width: 120px;
  padding: 0.875rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: transparent;
  color: var(--jet-gray-lighter);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.tab-btn:hover {
  background: #f7fafc;
  color: var(--jet-gray);
}

.tab-btn.active {
  background: var(--gradient-accent);
  color: white;
  box-shadow: 0 2px 8px rgba(255, 102, 0, 0.3);
}

/* Tab Content */
.tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Content Card */
.content-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f1f5f9;
}

.content-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--jet-dark);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.content-header h2 i {
  color: var(--jet-primary);
}

.content-actions {
  display: flex;
  gap: 0.75rem;
}

/* Alert/Ticket Items */
.item-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.item {
  background: #f9fafb;
  border-radius: 0.75rem;
  padding: 1.25rem;
  border-left: 4px solid;
  transition: all 0.2s;
  cursor: pointer;
}

.item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.item.severity-disaster { border-left-color: #dc2626; }
.item.severity-critical { border-left-color: #ea580c; }
.item.severity-warning { border-left-color: #f59e0b; }
.item.severity-info { border-left-color: #3b82f6; }

.item-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.item-title {
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--jet-dark);
}

.item-badges {
  display: flex;
  gap: 0.5rem;
}

.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge.severity-disaster { background: #fee2e2; color: #991b1b; }
.badge.severity-critical { background: #ffedd5; color: #9a3412; }
.badge.severity-warning { background: #fef3c7; color: #92400e; }
.badge.severity-info { background: #dbeafe; color: #1e40af; }

.badge.status-active { background: #fee2e2; color: #991b1b; }
.badge.status-acknowledged { background: #fef3c7; color: #92400e; }
.badge.status-resolved { background: #d1fae5; color: #065f46; }

.item-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: var(--jet-gray-lighter);
  margin-top: 0.75rem;
}

.item-meta i {
  margin-right: 0.25rem;
  color: var(--jet-gray-light);
}

/* Grid Items (for clients/systems) */
.grid-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.grid-item {
  background: #f9fafb;
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.grid-item:hover {
  border-color: var(--jet-primary);
  box-shadow: 0 4px 12px rgba(255, 102, 0, 0.15);
}

.grid-item-header {
  display: flex;
  align-items: start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.grid-item-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.grid-item-title {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--jet-dark);
  margin-bottom: 0.25rem;
}

.grid-item-subtitle {
  font-size: 0.875rem;
  color: var(--jet-gray-lighter);
}

.grid-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--jet-gray);
}

.grid-item-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 0.5rem;
}

/* Filters */
.filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-select {
  padding: 0.625rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: white;
  color: var(--jet-gray);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-select:hover {
  border-color: var(--jet-primary);
}

.filter-select:focus {
  outline: none;
  border-color: var(--jet-primary);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--jet-gray-lighter);
}

.empty-state i {
  font-size: 4rem;
  opacity: 0.3;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--jet-gray);
}

/* Loading State */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  color: var(--jet-primary);
}

.loading i {
  font-size: 3rem;
  animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
  .dashboard-container {
    padding: 1rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .charts-grid {
    grid-template-columns: 1fr;
  }
  
  .header-container {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .header-actions {
    width: 100%;
    justify-content: center;
  }
  
  .tabs-nav {
    flex-direction: column;
  }
  
  .tab-btn {
    width: 100%;
  }
}
