/**
 * Dashboard layout and controls – matches csm-ui. Literal values only.
 */

.dashboard {
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  overflow: visible;
  width: 100%;
  min-height: 100%;
}

.dashboard-header {
  margin-bottom: 24px;
  padding-top: 1.5rem;
}

.dashboard-header h1 {
  font-size: 28px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.dashboard-subtitle {
  color: #666;
  font-size: 14px;
}

.dashboard-controls {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: center;
  position: relative;
  z-index: 1;
  overflow: visible;
}

.search-container {
  flex: 1;
  max-width: 400px;
}

.search-input {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
}

.filters-container {
  display: flex;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.date-range-select {
  padding: 10px 16px;
  padding-right: 40px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  cursor: pointer;
  position: relative;
  z-index: 100;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  min-width: 150px;
}

.date-range-select:focus {
  outline: none;
  border-color: #1a1a1a;
  z-index: 101;
}

/* Practice Performance card – rounded-xl border shadow (reference design) */
.practice-performance-card {
  background: #fff;
  border-radius: 0.75rem; /* rounded-xl */
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

.practice-performance-header {
  display: flex;
  flex-direction: column;
  gap: 0.375rem; /* space-y-1.5 */
  padding: 1.5rem; /* p-6 */
}

.practice-performance-header-top {
  margin-bottom: 0;
}

.practice-performance-title {
  font-size: 1.125rem; /* text-lg */
  font-weight: 600; /* font-semibold */
  letter-spacing: -0.025em; /* tracking-tight */
  color: #111827;
  margin: 0;
}

.practice-performance-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.practice-performance-stats {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.practice-performance-stat-text {
  font-size: 0.875rem; /* text-sm */
  color: #4b5563; /* text-gray-600 */
  margin: 0;
}

.practice-performance-stat-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #9ca3af;
  flex-shrink: 0;
}

.practice-performance-legend-row {
  display: flex;
  align-items: center;
  gap: 1.5rem; /* gap-6 */
  font-size: 0.875rem;
}

.practice-performance-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem; /* gap-2 */
  color: #374151;
}

.practice-performance-legend-dot {
  width: 12px; /* w-3 */
  height: 12px; /* h-3 */
  border-radius: 50%;
  flex-shrink: 0;
}

.practice-performance-legend-dot-good {
  background: #22c55e; /* green-500 */
}

.practice-performance-legend-dot-watch {
  background: #eab308; /* yellow-500 */
}

.practice-performance-legend-dot-flagged {
  background: #ef4444; /* red-500 */
}

.practice-performance-configure-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.25rem; /* h-9 */
  padding: 0 1rem; /* px-4 py-2 */
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid #d1d5db; /* border-gray-300 */
  border-radius: 0.375rem;
  background: #fff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  cursor: pointer;
  color: #111827;
}

.practice-performance-configure-btn:hover {
  background: #f9fafb;
  color: #111827;
}

.practice-performance-configure-btn svg {
  width: 1rem;
  height: 1rem;
}

.practice-performance-table-wrap {
  padding: 0 1.5rem 1.5rem; /* p-6 pt-0 */
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden; /* no scrollbar when table fits */
}

@media (max-width: 900px) {
  .practice-performance-table-wrap {
    overflow-x: auto; /* enable scroll on narrow viewports */
  }
}

.practice-performance-loading {
  text-align: center;
  padding: 2.5rem;
  color: #6b7280;
  font-size: 0.875rem;
}
