/* ── Rally ATL Unified Admin Report Stylesheet ── */

/* ── Coaching Report Section ── */

/* Menu card styling on landing page */
.card-coaching-report::before {
  background: linear-gradient(90deg, #14b8a6, #06b6d4);
}

.card-coaching-report:hover {
  border-color: rgba(20, 184, 166, 0.3);
  box-shadow: 0 12px 30px rgba(20, 184, 166, 0.08);
  transform: translateY(-4px);
}

.card-coaching-report .card-icon-wrapper {
  background: rgba(20, 184, 166, 0.06);
  border: 1px solid rgba(20, 184, 166, 0.1);
}



/* Filters Card Styling */
.filters-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  align-items: flex-end;
}

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

.filter-group label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-control {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text-white);
  padding: 10px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

.filter-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

/* Level Breakdown Visuals */
.level-breakdown-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 10px;
}

.level-bar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}

.level-bar-label {
  font-weight: 600;
  width: 120px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.level-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.level-dot.red-ball {
  background-color: #ef4444;
}

.level-dot.orange-ball {
  background-color: #f97316;
}

.level-dot.green-dot {
  background-color: #22c55e;
}

.level-dot.yellow-ball {
  background-color: #eab308;
}

.level-dot.other-level {
  background-color: #64748b;
}

.level-bar-outer {
  background: #f1f5f9;
  border-radius: 99px;
  height: 12px;
  flex-grow: 1;
  overflow: hidden;
}

.level-bar-inner {
  height: 100%;
  border-radius: 99px;
  width: 0;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.level-bar-inner.red-ball {
  background-color: #ef4444;
}

.level-bar-inner.orange-ball {
  background-color: #f97316;
}

.level-bar-inner.green-dot {
  background-color: #22c55e;
}

.level-bar-inner.yellow-ball {
  background-color: #eab308;
}

.level-bar-inner.other-level {
  background-color: #64748b;
}

.level-bar-percent {
  font-weight: 700;
  width: 60px;
  text-align: right;
  flex-shrink: 0;
  color: var(--text-white);
  font-feature-settings: "tnum";
}



.avatar {
  width: 28px;
  height: 28px;
  border-radius: 20%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  color: #ffffff;
  margin-right: 10px;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 12px;
}

.rank-gold {
  background-color: #fef08a;
  color: #854d0e;
  border: 1px solid #fde047;
}

.rank-silver {
  background-color: #e2e8f0;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.rank-bronze {
  background-color: #ffedd5;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

.rank-other {
  background-color: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* ── Group Lesson Report Section ── */

/* Accordion Drawer CSS */
.drawer-row {
  background-color: #f8fafc;
}

.drawer-row td {
  padding: 0 !important;
}

.drawer-container {
  padding: 18px 24px;
  border-bottom: 1px solid var(--card-border);
}

.drawer-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lesson-details-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.lesson-detail-item {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.01);
}

.lesson-detail-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.lesson-detail-icon {
  font-size: 18px;
}

.lesson-detail-meta {
  display: flex;
  flex-direction: column;
}

.lesson-detail-site {
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.4;
}

.lesson-detail-date {
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 1px;
}

/* Expand Switch button styles */
.expand-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.15s;
  border: 1px solid var(--card-border);
  background-color: #ffffff;
}

.expand-btn:hover {
  background: #f1f5f9;
  color: var(--text-white);
  border-color: #cbd5e1;
}

.expand-btn svg {
  transition: transform 0.2s;
}

.expand-btn.expanded svg {
  transform: rotate(180deg);
}

/* Student Badge Styles for details */
.student-badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.student-badge-item {
  background: #ffffff;
  border: 1px solid var(--card-border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.01);
}

.student-badge-item.cancelled {
  background: #fef2f2;
  color: var(--error-hover);
  border-color: #fee2e2;
  text-decoration: line-through;
}

.student-badge-avatar {
  background: #f1f5f9;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}

/* ── UTR Report Section ── */


/* Dynamic Overview Stat Row Styles */
.stat-row-item {
  display: flex;
  flex-direction: column;
  padding: 10px 0;
  border-bottom: 1px solid var(--card-border);
}

.stat-row-item:last-child {
  border-bottom: none;
}

.stat-row-header {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  color: var(--text-white);
}

.stat-label {
  font-weight: 600;
  color: var(--text-muted);
}

.stat-row-header-simple {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--card-border);
}

.stat-row-header-simple:last-child {
  border-bottom: none;
}

.stat-value-avg {
  color: var(--primary);
  font-size: 14px;
}

.stat-row-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Table Column Widths & Alignments */
.col-utr {
  text-align: center;
  width: 120px;
  white-space: nowrap;
}

/* Cell-Specific Layout Styles */
.coach-id-cell {
  text-align: center;
  font-weight: 700;
  color: var(--text-muted);
}

.utr-singles-cell {
  text-align: center;
  font-weight: 800;
  color: var(--text-white);
  font-size: 14px;
}

.utr-doubles-cell {
  text-align: center;
  font-weight: 600;
  color: var(--text);
}

.external-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}


.external_link:hover {
  text-decoration: underline;
}

.table-error-row {
  text-align: center;
  color: var(--error);
  padding: 40px 0 !important;
}

.gender-icon {
  vertical-align: middle;
  margin-right: 4px;
  display: inline-block;
  width: 14px;
  height: 14px;
}

.gender-icon-boy {
  color: #2563eb;
  stroke: #2563eb;
}

.gender-icon-girl {
  color: #ec4899;
  stroke: #ec4899;
}

/* Footer Elements */
.footer-version {
  font-size: 11px;
  color: var(--text-muted);
}

/* Responsive grid overrides */
@media (max-width: 768px) {
  .section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .section-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}


.level-breakdown-loading {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 12px 0;
}

.col-rank {
  width: 80px;
  text-align: center;
}

.col-sessions-logged {
  width: 180px;
  text-align: center;
}

.col-hours-logged {
  width: 180px;
  text-align: center;
}

.col-unique-students {
  width: 220px;
  text-align: center;
}

/* Inactive Coaches List Panel */
.inactive-coaches-panel {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px 20px;
}

.inactive-coaches-header {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-white);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--card-border);
}

.inactive-coaches-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.inactive-coach-item {
  font-size: 13px;
  color: var(--text-white);
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.inactive-coach-item:last-child {
  border-bottom: none;
}

/* ── Section View Tabs & Filter Controls ── */
.tab-group {
  display: inline-flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  gap: 4px;
  border: 1px solid var(--card-border, #e2e8f0);
}

.btn-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted, #64748b);
  font-size: 13px;
  font-weight: 600;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-tab:hover {
  color: var(--text-white, #0f172a);
  background: rgba(255, 255, 255, 0.6);
}

.btn-tab.active {
  background: #ffffff;
  color: var(--text-white, #0f172a);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.search-input-wrap {
  position: relative;
  width: 100%;
}

.search-input-wrap input {
  padding-left: 36px;
}

.search-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted, #94a3b8);
  font-size: 14px;
  pointer-events: none;
}

/* Student Participation Badges & Pills */
.tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.tag-badge--registered {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.tag-badge--guest {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.tag-badge--paid {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.tag-badge--unpaid {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.tag-badge--partial {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Responsive adjustments */
@media (min-width: 480px) {
  .tab-group {
    width: auto;
  }
}

@media (min-width: 640px) {
  .btn-tab {
    font-size: 13.5px;
    padding: 8px 18px;
  }
}

/* ── Group Lesson Leaderboard Sync Card ── */
.leaderboard-sync-card {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--card-border, #e2e8f0);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.leaderboard-sync-card__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.leaderboard-sync-card__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.leaderboard-sync-card__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-white, #0f172a);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.leaderboard-sync-card__desc {
  font-size: 12.5px;
  color: var(--text-muted, #64748b);
  margin: 0;
  line-height: 1.4;
}

.leaderboard-sync-card__controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.leaderboard-sync-card__threshold {
  display: flex;
  align-items: center;
  gap: 8px;
}

.leaderboard-sync-card__threshold label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text, #334155);
  white-space: nowrap;
}

.leaderboard-sync-card__threshold input[type="number"] {
  width: 70px;
  text-align: center;
  font-weight: 700;
  padding: 8px 10px;
  border: 1px solid var(--input-border, #cbd5e1);
  border-radius: 8px;
  font-size: 14px;
}

.leaderboard-status-msg {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
}

.leaderboard-status-msg--success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.leaderboard-status-msg--error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

@media (min-width: 640px) {
  .leaderboard-sync-card__body {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}