/* =====================================
   AUTH / LOGIN PAGE
===================================== */
.auth-page {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: var(--bg);
}

.auth-container {
  width: 100%;
  max-width: 470px;
  padding: 1rem;
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(7,18,32,0.08);
  padding: 2rem;
  text-align: center;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.auth-logo i {
  font-size: 1.8rem;
  color: var(--secondary);
}
.auth-logo h2 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
}

.auth-title {
  margin-bottom: 1.5rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary);
}

.auth-form .form-group {
  text-align: left;
  margin-bottom: 1rem;
}
.auth-form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.auth-form input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 0.95rem;
}
.auth-form input:focus {
  border-color: var(--primary);
  outline: none;
}

/* Auth Buttons */
.btn-primary {
  width: 100%;
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 0.6rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--trans);
}
.btn-primary:hover { background: var(--primary-800); }

.btn-google {
  width: 100%;
  background: #fff;
  color: #444;
  border: 1px solid #ccc;
  padding: 0.6rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  transition: background 0.3s;
}
.btn-google img {
  width: 20px;
  height: 20px;
}
.btn-google:hover { background: #f7f7f7; }

/* =========================
   Mobile Fixes
========================= */
@media (max-width: 768px) {
  /* Remove fixed sidebar spacing */
  .main {
    margin-left: 0 !important;
    width: 100%;
    padding: 1rem;
  }
}


        /* Main Content Area */
        .main {
            margin-left: 250px;
            flex-grow: 1;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .left {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .main-content-container {
            padding: 2rem;
        }

        /* Tab Navigation */
        .tab-navigation {
            display: flex;
            gap: 1rem;
            margin-bottom: 2rem;
            border-bottom: 2px solid #e2e8e9;
        }

        .tab-link {
            padding: 1rem 1.5rem;
            background: none;
            border: none;
            font-size: 1rem;
            font-weight: 600;
            color: #64748b;
            cursor: pointer;
            border-bottom: 3px solid transparent;
            transition: all 0.3s ease;
        }

        .tab-link.active,
        .tab-link:hover {
            color: #FF6600;
            border-bottom-color: #FF6600;
        }

        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
        }

.filters { display: flex; align-items: center; gap: 1rem; }
.filters label { font-weight: 600; }
.filters select {
  padding: 0.3rem 0.5rem;
  border-radius: 5px;
  border: 1px solid #ccc;
}




/* =====================================
  ATHLETE MANAGEMENT TABLE
===================================== */
.athlete-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: 0.95rem;
  box-shadow: 0 0 8px rgba(0,0,0,0.05);
}
.athlete-table thead tr {
  background-color: var(--primary);
  color: var(--white);
  text-align: left;
}
.athlete-table th, .athlete-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #ddd;
  border-right: 1px solid #eee;
}
.athlete-table th:last-child,
.athlete-table td:last-child { border-right: none; }
.athlete-table tbody tr:last-child td { border-bottom: none; }
.athlete-table tbody tr:hover {
  background-color: #e6f0ff;
  transition: background-color var(--trans);
}

/* Athlete Table Buttons */
.athlete-table tbody button {
  padding: 6px 12px;
  font-size: 0.9rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background-color var(--trans);
  color: var(--white);
  margin-right: 8px;
}
.athlete-table tbody button.edit-btn { background-color: #5a9bf6; }
.athlete-table tbody button.edit-btn:hover { background-color: #3a7bd5; }
.athlete-table tbody button.delete-btn { background-color: #f25c54; }
.athlete-table tbody button.delete-btn:hover { background-color: #d33f38; }


/* View button */
.view-btn {
  background: #3498db;
  color: white;
  border: none;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
}


td.view-cell {
  text-align: center;
}

.view-btn:hover {
  background: #2980b9;
}


/* Search Icon */
.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-wrapper i {
  position: absolute;
  left: 10px;
  color: #666;
  font-size: 0.9rem;
}

.search-input {
  height: 36px;
  padding: 0 0.5rem 0 2rem;
  border-radius: 5px;
  border: 1px solid #ccc;
  font-size: 0.9rem;
  box-sizing: border-box;
}


/* -------------------------------------------------------------------------- */
/* Modal Container                             */
/* -------------------------------------------------------------------------- */
    #viewAthleteModal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.6);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            animation: fadeIn 0.3s ease;
        }

        #viewAthleteModal.active {
            display: flex;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        #viewAthleteModal .viewmodal {
            background: white;
            border-radius: 10px;
            width: 90%;
            max-width: 1200px;
            max-height: 85vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
            animation: slideIn 0.3s ease;
        }

        @keyframes slideIn {
            from {
                transform: translateY(-50px);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        #viewAthleteModal .viewmodal-header {
            background: linear-gradient(135deg, #1e40af, #3730a3);
            color: white;
            padding: 24px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-shrink: 0;
        }

        #viewAthleteModal .athlete-info {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        #viewAthleteModal .athlete-avatar {
            width: 64px;
            height: 64px;
            background: linear-gradient(135deg, #f59e0b, #ef4444);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            font-weight: bold;
            color: white;
            flex-shrink: 0;
        }

        #viewAthleteModal .athlete-details h2 {
            font-size: 24px;
            margin-bottom: 4px;
        }

        #viewAthleteModal .athlete-meta {
            opacity: 0.9;
            font-size: 14px;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        #viewAthleteModal .athlete-meta-row {
            display: flex;
            flex-wrap: wrap;
            gap: 4px 8px; /* row-gap column-gap */
        }

        #viewAthleteModal .athlete-meta-row span:not(:last-child)::after {
            content: "•";
            margin-left: 8px;
            opacity: 0.7;
        }

        #viewAthleteModal .close-btn {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: white;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.3s ease;
            flex-shrink: 0;
        }

        #viewAthleteModal .close-btn:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        #viewAthleteModal .tab-navigation {
            background: #f8fafc;
            border-bottom: 1px solid #e2e8f0;
            padding: 0 24px;
            display: flex;
            gap: 0;
            flex-shrink: 0;
        }

        #viewAthleteModal .icon {
            width: 1.2em;
            height: 1.2em;
            margin-right: 8px;
            vertical-align: middle;
            stroke-width: 2;
        }

        #viewAthleteModal .tab-btn {
            background: none;
            border: none;
            padding: 16px 24px;
            cursor: pointer;
            font-weight: 600;
            color: #64748b;
            border-bottom: 3px solid transparent;
            transition: all 0.3s ease;
            position: relative;
            display: flex;
            align-items: center;
            gap: 8px;

        }

        #viewAthleteModal .tab-btn.active {
            color: #1e40af;
            border-bottom-color: #1e40af;
            background: white;
        }

        #viewAthleteModal .tab-btn:hover:not(.active) {
            color: #475569;
            background: rgba(30, 64, 175, 0.05);
        }

        #viewAthleteModal .viewmodal-content {
            padding: 24px;
            overflow-y: auto;
            flex-grow: 1;
            background-color: #f8fafc;
        }

        #viewAthleteModal .tab-content {
            display: none;
            animation: fadeInContent 0.4s ease;
        }

        #viewAthleteModal .tab-content.active {
            display: block;
        }

        @keyframes fadeInContent {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        #viewAthleteModal .section-container {
            background: white;
            padding: 24px;
            border-radius: 12px;
            border: 1px solid #e2e8f0;
            margin-bottom: 24px;
        }

        #viewAthleteModal .section-title {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 16px;
            color: #1e293b;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 12px;
        }

        #viewAthleteModal .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
        }

        #viewAthleteModal .stat-card {
            background: linear-gradient(135deg, #f8fafc, #f1f5f9);
            padding: 20px;
            border-radius: 12px;
            border: 1px solid #e2e8f0;
            display: flex;
            gap: 16px;
            align-items: center;
            transition: all 0.3s ease;
        }

        #viewAthleteModal .stat-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 10px 20px -5px rgba(30, 64, 175, 0.1);
        }

        #viewAthleteModal .stat-icon {
            flex-shrink: 0;
            width: 48px;
            height: 48px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: #dbeafe;
            color: #1e40af;
        }
        #viewAthleteModal .stat-icon svg { width: 24px; height: 24px; }

        #viewAthleteModal .stat-value { font-size: 28px; font-weight: bold; color: #1e40af; margin-bottom: 2px; }
        #viewAthleteModal .stat-label { color: #64748b; font-size: 14px; }

        #viewAthleteModal .chart-placeholder {
            background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #4338ca;
            font-weight: 500;
        }

        #viewAthleteModal .analytics-charts-grid {
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 24px;
            align-items: flex-start;
        }
        #viewAthleteModal .analytics-charts-grid .right-column {
            display: flex;
            flex-direction: column;
            gap: 24px;
        }
        @media (max-width: 992px) {
            #viewAthleteModal .analytics-charts-grid {
                grid-template-columns: 1fr;
            }
        }
        #viewAthleteModal .analytics-charts-grid .section-container {
            margin-bottom: 0;
        }

        #viewAthleteModal .chart-filters { display: flex; gap: 8px; }

        #viewAthleteModal .filter-btn {
            background: #f1f5f9; border: 1px solid #e2e8f0; padding: 6px 12px;
            border-radius: 6px; cursor: pointer; font-size: 13px;
            transition: all 0.3s ease; font-weight: 500; color: #334155;
        }
        #viewAthleteModal .filter-btn:hover { background: #e2e8f0; }
        #viewAthleteModal .filter-btn.active { background: #1e40af; color: white; border-color: #1e40af; }

        #viewAthleteModal .action-button { background: #3b82f6; color: white; border: none; padding: 8px 16px; border-radius: 6px; font-size: 14px; cursor: pointer; transition: background 0.3s ease; }
        #viewAthleteModal .action-button:hover { background: #2563eb; }

        #viewAthleteModal .history-list { display: grid; gap: 16px; }
        #viewAthleteModal .history-item { background: white; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; transition: all 0.3s ease; }
        #viewAthleteModal .history-item:hover { border-color: #1e40af; box-shadow: 0 4px 12px -2px rgba(30, 64, 175, 0.1); transform: translateY(-2px); }
        #viewAthleteModal .history-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
        #viewAthleteModal .history-title { font-weight: 600; color: #1e293b; }
        #viewAthleteModal .history-date { color: #64748b; font-size: 14px; }

        #viewAthleteModal .status-badge {
            display: inline-block; padding: 4px 12px; border-radius: 20px;
            font-size: 12px; font-weight: 600;
        }
        #viewAthleteModal .status-badge.good { background: #dcfce7; color: #166534; }
        #viewAthleteModal .status-badge.average { background: #fef9c3; color: #854d0e; }
        #viewAthleteModal .status-badge.low { background: #fee2e2; color: #b91c1c; }

        #viewAthleteModal .history-filter-controls { display: flex; justify-content: flex-start; align-items: center; margin-bottom: 20px; gap: 12px; }
        #viewAthleteModal .history-filter-controls label { font-size: 14px; color: #475569; font-weight: 500; }
        #viewAthleteModal .history-filter-controls select { background: #f8fafc; border: 1px solid #e2e8f0; padding: 8px 12px; border-radius: 6px; font-size: 14px; color: #334155; cursor: pointer; transition: all 0.3s ease; }
        #viewAthleteModal .history-filter-controls select:hover { background: #e2e8f0; }

        #viewAthleteModal .assessment-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 24px;
        }
        #viewAthleteModal .assessment-category { margin-bottom: 0; }
        #viewAthleteModal .assessment-category h4 { font-size: 16px; font-weight: 600; color: #334155; margin-bottom: 12px; border-bottom: 1px solid #e2e8f0; padding-bottom: 8px; }

        #viewAthleteModal .assessment-list { display: flex; flex-direction: column; gap: 4px; }

        #viewAthleteModal .assessment-item {
            display: flex;
            align-items: center;
            gap: 16px;
            font-size: 14px;
            padding: 8px 0;
            border-bottom: 1px solid #f1f5f9;
        }
        #viewAthleteModal .assessment-list .assessment-item:last-child {
            border-bottom: none;
        }

        #viewAthleteModal .assessment-label { flex: 1; font-weight: 500; color: #475569; }
        #viewAthleteModal .assessment-score { width: 40px; font-weight: bold; color: #1e40af; text-align: right; }
        #viewAthleteModal .assessment-level {
            width: 120px;
            font-weight: 600;
            text-align: center;
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 12px;
        }

        #viewAthleteModal .level-elite { color: #5b21b6; background: #f3e8ff; }
        #viewAthleteModal .level-advanced { color: #1e40af; background: #dbeafe; }
        #viewAthleteModal .level-proficient { color: #166534; background: #dcfce7; }
        #viewAthleteModal .level-developing { color: #854d0e; background: #fef9c3; }
        #viewAthleteModal .level-needs-improvement { color: #b91c1c; background: #fee2e2; }

        #viewAthleteModal .health-card { background: white; border-radius: 12px; border: 1px solid #e2e8f0; padding: 20px; }
        #viewAthleteModal .health-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
        #viewAthleteModal .health-card-icon { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
        #viewAthleteModal .health-card-icon svg { width: 24px; height: 24px; }
        #viewAthleteModal .health-card-icon.warning-bg { background-color: #fef3c7; color: #f59e0b; }
        #viewAthleteModal .health-card-icon.info-bg { background-color: #dbeafe; color: #3b82f6; }
        #viewAthleteModal .health-card h4 { font-size: 16px; color: #1e293b; margin-bottom: 4px; }
        #viewAthleteModal .health-card p { font-size: 14px; color: #64748b; }

        #viewAthleteModal .health-status-summary {
            display: flex;
            align-items: center;
            gap: 12px;
            background-color: #f8fafc;
            padding: 12px 16px;
            border-radius: 8px;
            border: 1px solid #e2e8f0;
            margin-bottom: 16px;
        }
        #viewAthleteModal .health-status-summary .health-card-icon {
            width: 36px;
            height: 36px;
            flex-shrink: 0;
        }
        #viewAthleteModal .health-status-summary .health-card-icon svg {
            width: 20px;
            height: 20px;
        }
        #viewAthleteModal .health-status-summary .status-text {
            font-size: 14px;
            color: #475569;
            line-height: 1.4;
        }
        #viewAthleteModal .health-status-summary .status-text strong {
            font-weight: 600;
            color: #1e293b;
        }

        /* NEW: Pain Report Grid Styles */
        #viewAthleteModal .pain-report-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 24px;
            margin-top: 12px;
        }
        #viewAthleteModal .pain-report-category h5 {
            font-size: 14px;
            font-weight: 600;
            color: #334155;
            margin-bottom: 8px;
        }
        #viewAthleteModal .pain-report-grid ul {
            list-style: none;
            padding-left: 0;
            margin: 0;
        }
        #viewAthleteModal .pain-report-grid li {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 14px;
            padding: 10px 0;
            border-bottom: 1px solid #f1f5f9;
        }
        #viewAthleteModal .pain-report-grid li:last-child {
            border-bottom: none;
        }
        #viewAthleteModal .pain-report-grid li span:first-child {
            font-weight: 500;
            color: #475569;
        }
        @media (max-width: 576px) {
            #viewAthleteModal .pain-report-grid {
                grid-template-columns: 1fr;
                gap: 16px;
            }
        }

        /* Scrollbar styles */
        #viewAthleteModal .scrollbar-thin { scrollbar-width: thin; scrollbar-color: #cbd5e1 #f8fafc; }
        #viewAthleteModal .scrollbar-thin::-webkit-scrollbar { width: 6px; }
        #viewAthleteModal .scrollbar-thin::-webkit-scrollbar-track { background: #f8fafc; }
        #viewAthleteModal .scrollbar-thin::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
        #viewAthleteModal .scrollbar-thin::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

