.detail-page {
  color: white;
  padding: 2rem;
}

/* DETAIL HEADER */
.detail-header {
  background: linear-gradient(135deg, rgba(100, 150, 255, 0.2) 0%, rgba(100, 100, 200, 0.1) 100%);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 3rem;
  border-left: 5px solid rgba(255, 255, 255, 0.3);
}

.detail-header h1 {
  font-size: 2.2rem;
  margin: 0 0 0.5rem 0;
  font-weight: bold;
}

.detail-header p {
  font-size: 1rem;
  opacity: 0.9;
  margin: 0;
}

/* DETAIL CONTENT */
.detail-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
}

/* KPI SELECTOR */
.kpi-selector {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 8px;
  padding: 1.5rem;
  color: #333;
  height: fit-content;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.kpi-selector h3 {
  font-size: 1.2rem;
  margin: 0 0 1.2rem 0;
  color: #333;
  font-weight: bold;
}

/* ACTION BUTTONS */
.action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.btn {
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-export {
  background: #6496ff;
  color: white;
}

.btn-export:hover:not(:disabled) {
  background: #4472ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(100, 150, 255, 0.4);
}

.btn-chart {
  background: #52d273;
  color: white;
}

.btn-chart:hover:not(:disabled) {
  background: #38c459;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(82, 210, 115, 0.4);
}

.kpi-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.kpi-option {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  font-size: 0.95rem;
}

.kpi-option:hover {
  border-color: #6496ff;
  background: #f8f9ff;
}

.kpi-option.active {
  background: #6496ff;
  color: white;
  border-color: #6496ff;
}

.kpi-name {
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.kpi-unit {
  font-size: 0.85rem;
  opacity: 0.7;
}

/* KPI DETAILS */
.kpi-details {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 8px;
  padding: 2rem;
  color: #333;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.details-header {
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.details-header h2 {
  font-size: 1.8rem;
  margin: 0 0 1.2rem 0;
  color: #333;
}

.details-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.info-item {
  background: #f9f9f9;
  border-left: 3px solid #6496ff;
  border-radius: 4px;
  padding: 1rem;
}

.info-label {
  font-size: 0.85rem;
  color: #999;
  font-weight: 600;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
}

.info-value {
  font-size: 1.2rem;
  font-weight: bold;
  color: #333;
}

/* DESCRIPTION SECTION */
.details-description {
  margin-bottom: 2rem;
}

.details-description h4 {
  font-size: 1.1rem;
  color: #333;
  margin: 1.2rem 0 0.6rem 0;
  font-weight: bold;
}

.details-description p {
  color: #666;
  line-height: 1.6;
  margin: 0;
}

/* STATISTICS SECTION */
.details-stats {
  background: #f9f9f9;
  border-radius: 6px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.details-stats h4 {
  font-size: 1.1rem;
  color: #333;
  margin: 0 0 1rem 0;
  font-weight: bold;
}

.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
}

.stat-box {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 1rem;
  text-align: center;
}

.stat-box-label {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 0.5rem;
}

.stat-box-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
}

/* MEASUREMENTS TABLE */
.measurements-section {
  margin-top: 2rem;
}

.measurements-section h4 {
  font-size: 1.1rem;
  color: #333;
  margin: 0 0 1rem 0;
  font-weight: bold;
}

.measurements-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 6px;
  overflow: hidden;
}

.measurements-table thead {
  background: #f9f9f9;
}

.measurements-table th {
  padding: 1rem;
  text-align: left;
  font-weight: bold;
  color: #333;
  border-bottom: 2px solid #e0e0e0;
}

.measurements-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #e0e0e0;
  color: #666;
}

.measurements-table tbody tr:hover {
  background: #f9f9f9;
}

.status-badge {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-good {
  background: #d4edda;
  color: #155724;
}

.status-warning {
  background: #fff3cd;
  color: #856404;
}

.status-critical {
  background: #f8d7da;
  color: #721c24;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .detail-content {
    grid-template-columns: 1fr;
  }

  .kpi-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    height: auto;
  }

  .kpi-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
  }
}
