/* User Dashboard & Detailed Statistics styles */

/* Level item bars inside dashboard */
/* Level item bars inside dashboard - Pastel Landscape Gradients */
.db-learning-level {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.7);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

.db-learning-level:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.db-learning-level.locked {
  opacity: 0.9;
}

/* Beginner Card Background - Soft Pink Pastel 3D Cloud Landscape */
.db-learning-level.beginner {
  background: #ffe0eb;
  background-image: url("../../assets/images/beginner-level-bg.png");
  background-position: center right;
  background-size: cover;
  background-repeat: no-repeat;
}

/* Intermediate Card Background - Soft Cyan Pastel 3D Wave & Hills Landscape */
.db-learning-level.intermediate {
  background: #d6f5ff;
  background-image: url("../../assets/images/intermediate-level-bg.png");
  background-position: center right;
  background-size: cover;
  background-repeat: no-repeat;
}

/* Advanced Card Background - Warm Sunset 3D Mountain & Moon Sky Landscape */
.db-learning-level.advanced {
  background: #f7d2f0;
  background-image: url("../../assets/images/advanced-level-bg.png");
  background-position: center right;
  background-size: cover;
  background-repeat: no-repeat;
}

.db-lvl-card-content {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  position: relative;
  z-index: 2;
}

.db-lvl-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.95);
}

.db-lvl-main-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.db-lvl-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.db-lvl-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
}

.db-lvl-lock-badge {
  background: #334155;
  color: #ffffff;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.db-lvl-progress-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.db-lvl-progress-track {
  flex: 1;
  height: 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.65);
  overflow: hidden;
}

.db-lvl-progress-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.4s ease;
}

.beginner-fill {
  background: linear-gradient(90deg, #7c3aed 0%, #6366f1 100%);
}

.intermediate-fill {
  background: linear-gradient(90deg, #0284c7 0%, #38bdf8 100%);
}

.advanced-fill {
  background: linear-gradient(90deg, #9333ea 0%, #c084fc 100%);
}

.db-lvl-percent {
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
}

/* Error Character Badge Tags */
.err-tag-badge {
  background: var(--bg-app);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-title);
  box-shadow: 0 1px 0 var(--border);
}

.err-tag-char {
  font-weight: 800;
  color: var(--error);
}

.err-tag-count {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* History table badges styling */
.history-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}

.history-badge.type-lesson { background: var(--primary-light); color: var(--primary); }
.history-badge.type-test { background: hsl(200, 85%, 95%); color: hsl(200, 85%, 55%); }

.history-badge.rating-best { background: var(--success-light); color: var(--success); }
.history-badge.rating-great { background: var(--warning-light); color: var(--warning); }
.history-badge.rating-good { background: var(--bg-app); color: var(--text-muted); }

.history-table-row {
  border-bottom: 1px solid var(--border);
  transition: var(--transition-fast);
}

.history-table-row:hover {
  background: var(--bg-surface-hover);
}

.history-table-row:last-child {
  border-bottom: none;
}

/* Metric card structures */
.metric-square {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  padding: 0.75rem 1rem !important;
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--border) !important;
  background: var(--bg-surface) !important;
  transition: var(--transition-normal) !important;
  height: auto !important;
  min-height: 80px !important;
}

.metric-square:hover {
  transform: translateY(-2px) !important;
  box-shadow: var(--shadow-md) !important;
}

.metric-lbl {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  color: var(--text-muted) !important;
  line-height: 1 !important;
  margin-bottom: 0.15rem !important;
}

/* Google Search Console Style Metric Toggle Cards */
.gsc-metric-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.25rem;
  background: var(--bg-app);
}

.gsc-metric-card {
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.35rem;
  border-right: 1px solid var(--border);
  background: var(--bg-surface);
  position: relative;
}

.gsc-metric-card:last-child {
  border-right: none;
}

.gsc-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.gsc-checkbox {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 2px solid var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.gsc-checkbox svg {
  width: 10px;
  height: 10px;
  stroke-width: 3;
  opacity: 0;
  transform: scale(0.5);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.gsc-metric-value {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
  font-family: var(--font-title);
  transition: color 0.2s ease;
}

.gsc-metric-unit {
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.85;
}

/* WPM Card (Blue / Purple) */
.gsc-card-wpm .gsc-metric-value { color: #4285f4; }
.gsc-card-wpm.active {
  background: #4285f4;
  color: #ffffff;
}
.gsc-card-wpm.active .gsc-card-header { color: #ffffff; }
.gsc-card-wpm.active .gsc-metric-value { color: #ffffff; }
.gsc-card-wpm.active .gsc-checkbox {
  background: #ffffff;
  border-color: #ffffff;
}
.gsc-card-wpm.active .gsc-checkbox svg {
  stroke: #4285f4;
  opacity: 1;
  transform: scale(1);
}

/* Accuracy Card (Green / Teal) */
.gsc-card-acc .gsc-metric-value { color: #00897b; }
.gsc-card-acc.active {
  background: #00897b;
  color: #ffffff;
}
.gsc-card-acc.active .gsc-card-header { color: #ffffff; }
.gsc-card-acc.active .gsc-metric-value { color: #ffffff; }
.gsc-card-acc.active .gsc-checkbox {
  background: #ffffff;
  border-color: #ffffff;
}
.gsc-card-acc.active .gsc-checkbox svg {
  stroke: #00897b;
  opacity: 1;
  transform: scale(1);
}

/* Errors Card (Orange / Red) */
.gsc-card-err .gsc-metric-value { color: #e65100; }
.gsc-card-err.active {
  background: #e65100;
  color: #ffffff;
}
.gsc-card-err.active .gsc-card-header { color: #ffffff; }
.gsc-card-err.active .gsc-metric-value { color: #ffffff; }
.gsc-card-err.active .gsc-checkbox {
  background: #ffffff;
  border-color: #ffffff;
}
.gsc-card-err.active .gsc-checkbox svg {
  stroke: #e65100;
  opacity: 1;
  transform: scale(1);
}

/* Hover effects */
.gsc-metric-card:hover:not(.active) {
  background: var(--bg-surface-hover);
}
.gsc-metric-card.active:hover {
  filter: brightness(0.95);
}

/* Chart canvas container for responsive scaling */
.db-chart-canvas-container {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  position: relative;
  height: 220px !important;
  max-height: 230px !important;
}

.db-chart-canvas-container canvas {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
}

/* Google Search Console Filter Bar Styles */
.gsc-filter-bar {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.gsc-filter-tab {
  padding: 0.3rem 0.65rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-right: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.gsc-filter-tab:last-child {
  border-right: none;
}

.gsc-filter-tab:hover {
  background: var(--bg-surface-hover);
  color: var(--primary);
}

.gsc-filter-tab.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}

/* Google Search Console Date Range Modal Box */
.gsc-date-modal-box {
  background: #ffffff;
  border-radius: 20px;
  width: 90%;
  max-width: 480px;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
  animation: modalPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: #202124;
  position: relative;
}

.gsc-modal-header h3 {
  font-size: 1.35rem;
  font-weight: 500;
  color: #202124;
  margin: 0 0 0.75rem 0;
}

.gsc-modal-tabs {
  display: flex;
  gap: 1.5rem;
  border-bottom: 1px solid #dadce0;
  margin-bottom: 1.25rem;
}

.gsc-modal-tab {
  background: none;
  border: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.4rem 0.25rem;
  color: #5f6368;
  cursor: pointer;
  position: relative;
}

.gsc-modal-tab.active {
  color: #1a73e8;
}

.gsc-modal-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: #1a73e8;
  border-radius: 3px 3px 0 0;
}

.gsc-modal-tab.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.gsc-modal-options {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.gsc-radio-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: #3c4043;
  user-select: none;
}

.gsc-radio-option input[type="radio"] {
  display: none;
}

.gsc-radio-circle {
  width: 18px;
  height: 18px;
  border: 2px solid #5f6368;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.gsc-radio-option input[type="radio"]:checked + .gsc-radio-circle {
  border-color: #1a73e8;
}

.gsc-radio-option input[type="radio"]:checked + .gsc-radio-circle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  background: #1a73e8;
  border-radius: 50%;
}

.gsc-custom-dates-container {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: 1.8rem;
  margin-bottom: 1.25rem;
}

.gsc-date-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.gsc-field-label {
  font-size: 0.7rem;
  color: #5f6368;
  font-weight: 500;
}

.gsc-date-field-wrapper {
  display: flex;
  align-items: center;
  border: 1px solid #dadce0;
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  background: #ffffff;
  transition: border-color 0.2s ease;
}

.gsc-date-field-wrapper:focus-within, .gsc-date-field-wrapper.active {
  border-color: #1a73e8;
  box-shadow: 0 0 0 1px #1a73e8;
}

.gsc-date-input {
  border: none;
  outline: none;
  font-size: 0.85rem;
  color: #202124;
  width: 100%;
  font-family: inherit;
  background: transparent;
}

.gsc-calendar-icon {
  color: #5f6368;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gsc-field-sub {
  font-size: 0.65rem;
  color: #70757a;
}

.gsc-date-sep {
  color: #70757a;
  font-size: 1rem;
  margin-top: 0.4rem;
}

.gsc-modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.gsc-btn-cancel {
  background: none;
  border: none;
  color: #1a73e8;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  border-radius: 18px;
}

.gsc-btn-cancel:hover {
  background: #f1f3f4;
}

.gsc-btn-apply {
  background: #1a73e8;
  border: none;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.45rem 1.3rem;
  border-radius: 18px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: background 0.2s ease;
}

.gsc-btn-apply:hover {
  background: #1557b0;
}

/* Calendar Popover Window */
.gsc-calendar-popover {
  position: absolute;
  z-index: 10005;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
  border: 1px solid #e0e0e0;
  padding: 0.85rem 1rem;
  width: 270px;
  color: #202124;
  animation: popoverFadeIn 0.2s ease;
}

@keyframes popoverFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.gsc-cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

.gsc-cal-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #202124;
}

.gsc-cal-nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.2rem 0.45rem;
  font-size: 0.85rem;
  color: #5f6368;
  border-radius: 4px;
}

.gsc-cal-nav-btn:hover {
  background: #f1f3f4;
}

.gsc-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: #70757a;
  margin-bottom: 0.4rem;
}

.gsc-cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}

.gsc-cal-day {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  border-radius: 50%;
  cursor: pointer;
  margin: 0 auto;
  color: #202124;
  transition: background 0.15s ease;
}

.gsc-cal-day:hover:not(.empty) {
  background: #e8f0fe;
  color: #1a73e8;
}

.gsc-cal-day.selected {
  background: #1a73e8 !important;
  color: #ffffff !important;
  font-weight: 700;
}

.gsc-cal-day.empty {
  cursor: default;
}

.gsc-cal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.65rem;
  padding-top: 0.45rem;
  border-top: 1px solid #f1f3f4;
}

.gsc-cal-act-link {
  background: none;
  border: none;
  color: #1a73e8;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.gsc-cal-act-link:hover {
  background: #f8f9fa;
}

.gsc-cal-act-btn {
  background: #1a73e8;
  color: white;
  border: none;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 12px;
  cursor: pointer;
}

/* History table scroll container */
.db-history-table-container {
  max-height: 320px;
  overflow-y: auto;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 100%;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.db-history-table-container table {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.db-history-table-container thead {
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  z-index: 5;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.db-history-table-container th {
  padding: 0.65rem 0.5rem;
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}

.db-history-table-container td {
  padding: 0.6rem 0.5rem;
  font-size: 0.78rem;
  vertical-align: middle;
}

.db-hist-col-name {
  font-weight: 600;
  max-width: 120px;
  line-height: 1.25;
}

.db-hist-col-type {
  text-align: center;
}

.db-hist-col-time {
  color: var(--text-muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

.db-hist-col-wpm {
  font-weight: 700;
  color: var(--primary);
  text-align: center;
}

.db-hist-col-acc {
  font-weight: 700;
  color: var(--success);
  text-align: center;
}

.db-hist-col-result {
  text-align: center;
}

/* Header section styles */
.db-header-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
}

.db-header-title {
  font-family: var(--font-title);
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.35rem;
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 45%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.db-header-subtitle {
  font-size: 0.95rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--text-muted) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* Dynamic Grid & Attractive Card System for KPI Section */
.db-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
  width: 100%;
}

.db-kpi-card {
  position: relative;
  padding: 1.1rem 1.15rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 115px;
  overflow: hidden;
}

.db-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  opacity: 0.9;
}

.db-kpi-card.kpi-wpm::before { background: linear-gradient(90deg, #8b5cf6, #6366f1); }
.db-kpi-card.kpi-acc::before { background: linear-gradient(90deg, #10b981, #059669); }
.db-kpi-card.kpi-tests::before { background: linear-gradient(90deg, #ef4444, #f43f5e); }
.db-kpi-card.kpi-time::before { background: linear-gradient(90deg, #0284c7, #38bdf8); }
.db-kpi-card.kpi-lessons::before { background: linear-gradient(90deg, #f59e0b, #d97706); }

.db-kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  border-color: rgba(139, 92, 246, 0.3);
}

.db-kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 0.5rem;
}

.db-kpi-label {
  font-family: var(--font-title);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.db-kpi-icon-wrapper {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.kpi-wpm .db-kpi-icon-wrapper { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.kpi-acc .db-kpi-icon-wrapper { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.kpi-tests .db-kpi-icon-wrapper { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.kpi-time .db-kpi-icon-wrapper { background: rgba(2, 132, 199, 0.12); color: #0284c7; }
.kpi-lessons .db-kpi-icon-wrapper { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }

.db-kpi-value-group {
  margin-top: 0.2rem;
}

.db-kpi-val {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.db-kpi-unit {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.db-kpi-sub {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.db-charts-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-lg);
  margin-bottom: 2rem;
  width: 100%;
  max-width: 100%;
}

.db-telemetry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: 2rem;
  width: 100%;
  max-width: 100%;
}

.db-summary-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  font-size: 0.8rem;
  width: 100%;
  max-width: 100%;
}

.db-dist-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
  width: 100%;
}

.db-dist-card {
  padding: 1.25rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

.db-dist-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  width: 100%;
  text-align: left;
}

.db-dist-chart-wrapper {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0.25rem auto 0.85rem auto;
}

.db-dist-center-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.db-dist-total-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
  display: block;
}

.db-dist-total-sub {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.db-dist-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  justify-content: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  width: 100%;
}

.db-dist-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.db-dist-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.db-trophy-card {
  background: linear-gradient(135deg, hsl(255, 85%, 97%) 0%, hsl(200, 85%, 96%) 100%);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  box-shadow: var(--shadow-sm);
  width: 100%;
  max-width: 100%;
}

.db-trophy-content {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.db-trophy-stats-group {
  display: flex;
  gap: var(--space-xl);
  text-align: center;
  align-items: center;
}

/* Mobile & Tablet Responsive Media Queries */
@media (max-width: 992px) {
  .db-charts-grid {
    grid-template-columns: 1fr;
  }
  .db-telemetry-grid {
    grid-template-columns: 1fr;
  }
  .db-telemetry-card {
    height: auto !important;
    min-height: 180px;
  }
  .db-dist-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }
  .db-dist-chart-wrapper {
    width: 130px;
    height: 130px;
  }
  .db-dist-card {
    padding: 1rem 0.5rem;
  }
}

@media (max-width: 768px) {
  .db-header-title {
    font-size: 1.6rem;
  }
  .db-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .db-dist-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .db-dist-chart-wrapper {
    width: 160px;
    height: 160px;
  }
  .db-trophy-card {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    padding: 1.25rem 1rem;
    gap: 1.25rem;
  }
  .db-trophy-content {
    justify-content: center;
    text-align: center;
    width: 100%;
    flex-direction: column;
    gap: 0.75rem;
  }
  .db-trophy-stats-group {
    justify-content: center;
    width: 100%;
    gap: 1.25rem;
  }
}

@media (max-width: 600px) {
  .gsc-metric-container {
    grid-template-columns: repeat(3, 1fr);
  }
  .gsc-metric-card {
    padding: 0.45rem 0.5rem;
    gap: 0.2rem;
    border-right: 1px solid var(--border);
    border-bottom: none;
  }
  .gsc-metric-card:last-child {
    border-right: none;
  }
  .gsc-card-header {
    font-size: 0.7rem;
    gap: 0.25rem;
  }
  .gsc-card-header span:not(.gsc-checkbox) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .gsc-checkbox {
    width: 12px;
    height: 12px;
    border-width: 1.5px;
  }
  .gsc-checkbox svg {
    width: 8px;
    height: 8px;
  }
  .gsc-metric-value {
    font-size: 1.05rem;
  }
  .gsc-metric-unit {
    font-size: 0.65rem;
  }
  .db-summary-stats-grid {
    grid-template-columns: 1fr;
  }
  .db-history-table-container th {
    padding: 0.45rem 0.3rem;
    font-size: 0.72rem;
  }
  .db-history-table-container td {
    padding: 0.45rem 0.3rem;
    font-size: 0.72rem;
  }
  .db-hist-col-name {
    font-size: 0.72rem;
    max-width: 95px;
  }
  .db-hist-col-time {
    font-size: 0.68rem;
  }
  .history-badge {
    padding: 0.15rem 0.35rem;
    font-size: 0.65rem;
  }
}

@media (max-width: 480px) {
  .db-header-title {
    font-size: 1.35rem;
  }
  .db-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  .metric-square {
    padding: 0.45rem 0.6rem !important;
    min-height: 62px !important;
  }
  .metric-lbl {
    font-size: 0.62rem !important;
    margin-bottom: 0 !important;
  }
  .metric-val-num {
    font-size: 1.15rem !important;
  }
  .metric-sub-lbl {
    display: none !important;
  }
  .gsc-metric-card {
    padding: 0.35rem 0.35rem;
  }
  .gsc-card-header span:not(.gsc-checkbox) {
    font-size: 0.62rem;
  }
  .gsc-metric-value {
    font-size: 0.95rem;
  }
  .db-history-table-container th {
    padding: 0.38rem 0.2rem;
    font-size: 0.66rem;
  }
  .db-history-table-container td {
    padding: 0.38rem 0.2rem;
    font-size: 0.66rem;
  }
  .db-hist-col-name {
    font-size: 0.68rem;
    max-width: 80px;
    word-break: break-word;
  }
  .db-hist-col-time {
    font-size: 0.62rem;
  }
  .history-badge {
    padding: 0.1rem 0.25rem;
    font-size: 0.6rem;
  }
}

@media (max-width: 360px) {
  .db-kpi-grid {
    grid-template-columns: 1fr;
  }
}


