/* Analytics Dashboard Styles */
.analytics-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 20px;
}

/* Breadcrumb & Actions */
.analytics-top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.analytics-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #64748B;
}

.analytics-breadcrumb .crumb {
  cursor: pointer;
  color: #0066CC;
  font-weight: 500;
}
.analytics-breadcrumb .crumb:hover {
  text-decoration: underline;
}
.analytics-breadcrumb .crumb.active {
  color: #0F172A;
  cursor: default;
  text-decoration: none;
}
.analytics-breadcrumb .separator {
  color: #CBD5E1;
}

.analytics-actions {
  display: flex;
  gap: 10px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s;
}
.action-btn:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
}
.action-btn.primary {
  background: #0066CC;
  color: #FFFFFF;
  border-color: #0066CC;
}
.action-btn.primary:hover {
  background: #0052A3;
}

/* Global Filter Bar */
.global-filter-bar {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}

.filter-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 13px;
  color: #0F172A;
  background: #F8FAFC;
  outline: none;
}

.filter-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid #F1F5F9;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filter-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #EFF6FF;
  color: #1D4ED8;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
}
.filter-chip button {
  background: none;
  border: none;
  color: #60A5FA;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}
.filter-chip button:hover {
  color: #1D4ED8;
}

.reset-filters {
  font-size: 12px;
  color: #64748B;
  cursor: pointer;
  background: none;
  border: none;
}
.reset-filters:hover {
  color: #0F172A;
  text-decoration: underline;
}

.showing-count {
  font-size: 13px;
  color: #64748B;
  font-weight: 500;
}

/* KPI Summary Row */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.kpi-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  border-color: #CBD5E1;
}

.kpi-title {
  font-size: 13px;
  color: #64748B;
  font-weight: 500;
  margin-bottom: 8px;
}

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

.kpi-value {
  font-size: 24px;
  font-weight: 700;
  color: #0F172A;
}

.kpi-delta {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 2px;
}
.kpi-delta.positive { color: #10B981; }
.kpi-delta.negative { color: #EF4444; }

.kpi-sparkline {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 24px;
}
.kpi-spark-bar {
  flex: 1;
  background: #E2E8F0;
  border-radius: 2px 2px 0 0;
}
.kpi-spark-bar.active {
  background: #3B82F6;
}

/* Tabs */
.analytics-tabs-nav {
  display: flex;
  border-bottom: 2px solid #E2E8F0;
  gap: 16px;
}

.analytics-tab-btn {
  padding: 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: #64748B;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all 0.2s;
}
.analytics-tab-btn:hover {
  color: #0F172A;
}
.analytics-tab-btn.active {
  color: #0066CC;
  border-bottom-color: #0066CC;
}

/* Chart Layouts */
.chart-grid {
  display: grid;
  gap: 12px;
}
.chart-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.chart-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.chart-grid.layout-60-40 { grid-template-columns: 3fr 2fr; }

.chart-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.chart-header {
  margin-bottom: 12px;
}
.chart-title {
  font-size: 16px;
  font-weight: 600;
  color: #0F172A;
  margin-bottom: 4px;
}
.chart-subtitle {
  font-size: 13px;
  color: #64748B;
}

.chart-container {
  flex: 1;
  position: relative;
  min-height: 240px;
}

/* Heatmap */
.heatmap-wrapper {
  overflow-x: auto;
}
.heatmap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.heatmap-table th, .heatmap-table td {
  padding: 10px;
  text-align: center;
  border: 1px solid #E2E8F0;
}
.heatmap-table th {
  background: #F8FAFC;
  font-weight: 600;
  color: #334155;
  position: sticky;
  top: 0;
}
.heatmap-table th:first-child {
  text-align: left;
  left: 0;
  z-index: 2;
}
.heatmap-table td:first-child {
  text-align: left;
  font-weight: 500;
  position: sticky;
  left: 0;
  background: #FFFFFF;
  z-index: 1;
}
.heatmap-cell {
  cursor: pointer;
  transition: opacity 0.2s;
  color: #fff;
  font-weight: 600;
}
.heatmap-cell:hover {
  opacity: 0.8;
}

/* AI Insights Panel */
.ai-insights-panel {
  background: linear-gradient(to right, #F8FAFC, #F1F5F9);
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px;
  margin-top: 12px;
}

.ai-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.ai-header i {
  color: #8B5CF6;
}
.ai-title {
  font-size: 16px;
  font-weight: 600;
  color: #0F172A;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.insight-card {
  padding: 12px;
  border-radius: 8px;
  border-left: 4px solid;
}
.insight-card.warning {
  background: #FFFBEB;
  border-color: #F59E0B;
}
.insight-card.positive {
  background: #ECFDF5;
  border-color: #10B981;
}
.insight-card.trend {
  background: #EFF6FF;
  border-color: #3B82F6;
}

.insight-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #0F172A;
}
.insight-detail {
  font-size: 13px;
  color: #334155;
  margin-bottom: 8px;
}
.insight-rec {
  font-size: 12px;
  font-weight: 500;
  color: #0F172A;
  background: rgba(255,255,255,0.5);
  padding: 6px 8px;
  border-radius: 4px;
}

/* Modals & Panels */
.slide-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: #FFFFFF;
  box-shadow: -4px 0 24px rgba(0,0,0,0.1);
  z-index: 1000;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}
.slide-panel.open {
  right: 0;
}
.slide-panel-header {
  padding: 20px;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.slide-panel-content {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.slide-panel-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #64748B;
}

.verbatim-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #334155;
  font-style: italic;
}
.verbatim-card.positive { border-left: 3px solid #10B981; }
.verbatim-card.negative { border-left: 3px solid #EF4444; }

/* Employee Table */
.employee-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.employee-table th, .employee-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #E2E8F0;
}
.employee-table th {
  background: #F8FAFC;
  font-weight: 600;
  color: #64748B;
}
