/* =====================================
   ROOT VARIABLES & GLOBAL RESET
===================================== */
html, body { height: 100%; margin: 0; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  display: flex;
  min-height: 100vh
}

/* =====================================
   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; }

.main {
    margin-left: 250px; 
    flex-grow: 1; 
    min-height: 100vh;
    transition: margin-left var(--trans);
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
}


.overlay.show {
    opacity: 1;
    pointer-events: auto;
}

    /* =====================================
    DASHBOARD CONTENT
===================================== */
.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1; 
    min-height: 0;
    padding: 20px;
    overflow-y: auto; 
}

/* =====================================
    CARD LAYOUT & STYLE
===================================== */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    flex-shrink: 0;
}

.card {
    background-color: var(--card-bg);
    padding: 12px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
                0 2px 4px -1px rgba(0, 0, 0, 0.06),
                inset 0 1px 2px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(224, 224, 224, 0.5);
}

.card .icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: rgba(0,0,0,0.03);
    z-index: 0;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--accent-color-1);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease-out;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 
                0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card:hover::before {
    transform: scaleX(1);
}

.card h3 {
    margin-top: 0;
    font-size: 1rem;
    color: var(--accent-color-1);
    font-weight: 600;
}

.count-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 10px 0 0;
    color: var(--text-color-dark);
}

/* =====================================
   MAIN CONTENT & TOPBAR
===================================== */
.main {
  width: calc(100% - var(--sidebar-width));
  transition: margin-left var(--trans), width var(--trans);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: auto;
  box-sizing: border-box;
}

.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;
}


/* =====================================
   COACH MANAGEMENT TABLE
===================================== */
.coach-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: 0.95rem;
  box-shadow: 0 0 8px rgba(0,0,0,0.05);
}
.coach-table thead tr {
  background-color: var(--primary);
  color: var(--white);
  text-align: left;
}
.coach-table th, .coach-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #ddd;
  border-right: 1px solid #eee;
}
.coach-table th:last-child,
.coach-table td:last-child { border-right: none; }
.coach-table tbody tr:last-child td { border-bottom: none; }
.coach-table tbody tr:hover {
  background-color: #e6f0ff;
  transition: background-color var(--trans);
}

/* Coach Table Buttons */
.coach-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;
}
.coach-table tbody button.edit-btn { background-color: #5a9bf6; }
.coach-table tbody button.edit-btn:hover { background-color: #3a7bd5; }
.coach-table tbody button.delete-btn { background-color: #f25c54; }
.coach-table tbody button.delete-btn:hover { background-color: #d33f38; }

/* Larger view modal */
.view-modal {
  max-width: 700px; 
  width: 90%;
}

.athlete-details {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.athlete-photo img {
  width: 150px;
  height: 150px;
  border-radius: 8px;
  object-fit: cover;
  background: #f0f0f0;
}

.athlete-info {
  flex: 1;
}


/* 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;
}

/* View Athlete Modal */
#viewAthleteModal .modal-content {
  max-width: 500px;
  margin: auto;
}

/* 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;
}

