﻿/* ===================== Laporan Page (.lp-*) ===================== */
.lp-page {
  padding: 0 0 40px;
  min-height: 100%;
}

/* ---------- Header ---------- */
.lp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}
.lp-title {
  font-size: 1.65rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}
.lp-subtitle {
  font-size: 0.92rem;
  color: #64748b;
  margin: 4px 0 0;
}
.lp-header-actions {
  display: flex;
  gap: 10px;
}

/* ---------- Buttons ---------- */
.lp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}
.lp-btn--primary {
  background: #2563eb;
  color: #fff;
}
.lp-btn--primary:hover {
  background: #1d4ed8;
}
.lp-btn--outline {
  background: #fff;
  color: #334155;
  border: 1px solid #e2e8f0;
}
.lp-btn--outline:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}
.lp-btn--sm {
  padding: 6px 12px;
  font-size: 0.82rem;
  border-radius: 8px;
}

/* ---------- Stats ---------- */
.lp-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.lp-stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.lp-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.lp-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lp-stat-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lp-stat-label {
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 500;
}
.lp-stat-value {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.2;
}

/* ---------- Charts Row ---------- */
.lp-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}
.lp-chart-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 22px 24px;
}
.lp-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 16px;
}

/* Donut */
.lp-pie-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
}
.lp-pie-svg {
  width: 110px;
  height: 110px;
  flex-shrink: 0;
}
.lp-pie-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lp-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.87rem;
  color: #334155;
}
.lp-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.lp-legend-label {
  flex: 1;
}
.lp-legend-count {
  font-weight: 600;
  color: #0f172a;
}

/* Bar */
.lp-bar-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.lp-bar-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lp-bar-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}
.lp-bar-label {
  color: #334155;
  font-weight: 500;
}
.lp-bar-count {
  font-weight: 600;
  color: #0f172a;
}
.lp-bar-track {
  height: 10px;
  background: #f1f5f9;
  border-radius: 5px;
  overflow: hidden;
}
.lp-bar-fill {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  transition: width 0.5s ease;
}

/* Line */
.lp-line-wrap {
  padding-top: 4px;
}
.lp-line-labels {
  display: flex;
  justify-content: space-between;
  padding: 6px 12px 0;
  font-size: 0.78rem;
  color: #94a3b8;
}

/* ---------- AI Insight ---------- */
.lp-ai-card {
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 22px;
}
.lp-ai-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #2563eb;
  margin-bottom: 4px;
}
.lp-ai-header .lp-card-title {
  color: #2563eb;
  margin: 0;
}
.lp-ai-text {
  font-size: 0.9rem;
  color: #334155;
  line-height: 1.6;
  margin: 8px 0 14px;
}
.lp-ai-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.lp-ai-tag {
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
}
.lp-ai-tag--green { background: #ecfdf5; color: #10b981; }
.lp-ai-tag--yellow { background: #fffbeb; color: #f59e0b; }
.lp-ai-tag--red { background: #fef2f2; color: #ef4444; }

/* ---------- Data Section ---------- */
.lp-data-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 22px 24px;
}
.lp-data-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}
.lp-data-header .lp-card-title {
  margin: 0;
}
.lp-data-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.lp-search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0 12px;
  color: #94a3b8;
  transition: border-color 0.2s;
}
.lp-search-box:focus-within {
  border-color: #3b82f6;
  color: #3b82f6;
}
.lp-search-input {
  border: none;
  background: transparent;
  outline: none;
  padding: 8px 0;
  font-size: 0.88rem;
  color: #0f172a;
  width: 180px;
}
.lp-filter-select {
  padding: 8px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 0.88rem;
  color: #334155;
  cursor: pointer;
  outline: none;
}
.lp-filter-select:focus {
  border-color: #3b82f6;
}
.lp-view-toggle {
  display: flex;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}
.lp-toggle-btn {
  padding: 8px 12px;
  background: #fff;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
}
.lp-toggle-btn--active {
  background: #2563eb;
  color: #fff;
}

/* ---------- Table ---------- */
.lp-table-wrap {
  overflow-x: auto;
}
.lp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.lp-table th {
  text-align: left;
  padding: 12px 14px;
  font-weight: 600;
  color: #64748b;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}
.lp-table td {
  padding: 12px 14px;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}
.lp-table tbody tr:hover {
  background: #f8fafc;
}
.lp-row--alert {
  background: #fef2f2;
}
.lp-row--alert:hover {
  background: #fee2e2;
}
.lp-td-name {
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
}
.lp-td-eval {
  max-width: 220px;
}
.lp-td-date {
  white-space: nowrap;
  color: #64748b;
  font-size: 0.85rem;
}
.lp-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.lp-action-btns {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* ---------- Card Grid ---------- */
.lp-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.lp-patient-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.lp-patient-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.lp-patient-card--alert {
  border-color: #fecaca;
  background: #fffbfb;
}
.lp-patient-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.lp-patient-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
}
.lp-patient-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.lp-info-row {
  display: flex;
  gap: 8px;
  font-size: 0.85rem;
  color: #334155;
  line-height: 1.45;
}
.lp-info-label {
  font-weight: 600;
  color: #64748b;
  flex-shrink: 0;
  min-width: 88px;
}
.lp-info-label::after {
  content: ':';
}
.lp-patient-card-actions {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

/* ===================== Responsive ===================== */
@media (max-width: 1200px) {
  .lp-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 900px) {
  .lp-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .lp-charts-row {
    grid-template-columns: 1fr;
  }
  .lp-data-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (max-width: 768px) {
  .lp-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .lp-header-actions {
    width: 100%;
  }
  .lp-header-actions .lp-btn {
    flex: 1;
    justify-content: center;
  }
  .lp-stats {
    grid-template-columns: 1fr 1fr;
  }
  .lp-data-controls {
    width: 100%;
  }
  .lp-search-box {
    flex: 1;
    min-width: 0;
  }
  .lp-search-input {
    width: 100%;
  }
  .lp-card-grid {
    grid-template-columns: 1fr;
  }
  .lp-pie-wrap {
    flex-direction: column;
    align-items: center;
  }
  .lp-pie-legend {
    flex-direction: row;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
  }
}
@media (max-width: 480px) {
  .lp-page {
    padding: 0 0 24px;
  }
  .lp-title {
    font-size: 1.3rem;
  }
  .lp-stats {
    grid-template-columns: 1fr;
  }
  .lp-stat-card {
    padding: 14px 16px;
  }
  .lp-chart-card {
    padding: 16px 14px;
  }
  .lp-data-section {
    padding: 16px 14px;
  }
  .lp-ai-card {
    padding: 16px 14px;
  }
  .lp-data-controls {
    flex-direction: column;
  }
  .lp-filter-select {
    width: 100%;
  }
  .lp-view-toggle {
    width: 100%;
  }
  .lp-toggle-btn {
    flex: 1;
  }
}
