/* --- GLOBAL STANDARDS --- */
*, *::before, *::after { box-sizing: border-box; }

:root { 
    --aggie-blue: #00263A; 
    --aggie-gold: #BFAE5A; 
    --bg-gray: #f8fafc; 
    --text-dark: #1e293b; 
    --white: #ffffff; 
}

html, body { 
    height: 100%; margin: 0; padding: 0; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    background-color: var(--bg-gray); color: var(--text-dark); 
}

.container { max-width: 600px; margin: 0 auto; padding: 15px; padding-bottom: 90px; }
.hidden { display: none !important; }
.text-center { text-align: center; }

/* AUTH & SETUP */
.full-screen-center { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--aggie-blue); z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; }
.auth-card { width: 100%; max-width: 340px; background: white; padding: 30px; border-radius: 16px; box-shadow: 0 15px 30px rgba(0,0,0,0.2); }
.logo-circle { width: 70px; height: 70px; background: var(--aggie-blue); border-radius: 50%; margin: 0 auto 15px auto; display:flex; align-items:center; justify-content:center; color:white; font-size:35px; border: 4px solid var(--aggie-gold); }

/* CARDS */
.card { background: var(--white); border-radius: 12px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); margin-bottom: 20px; overflow: hidden; border: 1px solid #e2e8f0; }
.card-header { background-color: var(--aggie-blue); color: white; padding: 12px 15px; font-weight: bold; font-size: 0.9rem; display: flex; justify-content: space-between; align-items: center; letter-spacing: 0.5px; }
.card-body { padding: 15px; }

/* HOME DASHBOARD COMPONENTS */
.dashboard-header { background: linear-gradient(135deg, var(--aggie-blue) 0%, #1e40af 100%); color: white; border: none; margin-bottom: 15px; }
.dashboard-header .card-body { padding: 30px 15px; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.dash-card { margin: 0; cursor: pointer; border: 2px solid var(--aggie-blue); height: 100%; display: flex; flex-direction: column; justify-content: center; }
.dash-card.border-gold { border-color: var(--aggie-gold); }
.dash-card.border-slate { border-color: #cbd5e1; background: #f8fafc; }
.dash-card.border-gray { border-color: #64748b; }
.dash-card-body { text-align: center; padding: 20px 15px; }
.dash-icon { font-size: 32px; margin-bottom: 5px; }
.dash-label { font-size: 12px; font-weight: bold; color: var(--aggie-blue); }
.dash-sublabel { font-size: 11px; color: #64748b; font-weight: normal; }

/* TRACKER COMPONENTS */
.tracker-box { padding: 10px; border-radius: 8px; border: 1px solid; margin-bottom: 15px; }
.tracker-box.bg-orange { background: #fff7ed; border-color: #ffedd5; }
.tracker-box.bg-red { background: #fef2f2; border-color: #fee2e2; }
.tracker-box.bg-blue { background: #f0f9ff; border-color: #e0f2fe; }
.tracker-box.bg-green { background: #f0fdf4; border-color: #dcfce7; }

.section-label { font-size: 0.75rem; margin-bottom: 4px; font-weight: 700; text-transform: uppercase; display: block; }
.section-label.text-orange { color: #c2410c; }
.section-label.text-red { color: #b91c1c; }
.section-label.text-blue { color: #0369a1; }
.section-label.text-green { color: #15803d; }

/* INPUTS & BUTTONS */
label { display: block; margin-bottom: 6px; font-weight: 700; color: #475569; font-size: 0.75rem; text-transform: uppercase; }
input, select, textarea { width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 16px; background: #fff; }
.input-row { display: flex; gap: 5px; align-items: center; }
.input-row input { margin: 0; padding: 8px; font-size: 12px; }
.input-row .flex-1 { flex: 1; }
.input-row .w-50 { width: 50px; }
.input-divider { font-size: 10px; color: #666; }

.primary-btn { background-color: var(--aggie-blue); color: white; border: none; padding: 14px; border-radius: 8px; font-size: 1rem; font-weight: bold; cursor: pointer; width: 100%; text-align: center; transition: opacity 0.2s; }
.primary-btn:active { opacity: 0.8; }
.secondary-btn { background-color: #e2e8f0; color: var(--text-dark); border: none; padding: 10px; border-radius: 6px; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.action-btn { background: rgba(255,255,255,0.2); color: white; border: 1px solid rgba(255,255,255,0.4); padding: 4px 10px; border-radius: 4px; cursor: pointer; font-size: 0.75rem; font-weight: bold; width: auto; white-space: nowrap; }
.btn-orange { background: #ea580c; }
.btn-red { background: #dc2626; }
.btn-blue { background: #0284c7; }
.btn-green { background: #16a34a; }
.delete-btn { background: #fee2e2; color: #b91c1c; border: none; padding: 6px 12px; border-radius: 4px; font-size: 12px; cursor: pointer; }
.link-btn { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; padding: 4px 8px; border-radius: 4px; font-size: 10px; cursor: pointer; margin-right: 5px; }

/* SESSION LIST GENERATED ITEMS */
.session-empty { padding: 10px; background: #f8fafc; border-radius: 6px; border: 1px dashed #cbd5e1; }
.session-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; background: white; border: 1px solid #e2e8f0; border-radius: 6px; margin-bottom: 6px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.session-item-text { text-align: left; line-height: 1.2; }
.session-item-title { font-weight: bold; color: var(--aggie-blue); font-size: 13px; }
.session-item-detail { font-size: 11px; color: #64748b; }

/* UTILS */
#outcome { display: flex; gap: 8px; margin-bottom: 15px; }
.outcome-btn { flex: 1; padding: 15px 5px; border: 1px solid #e2e8f0; border-radius: 8px; background: white; cursor: pointer; text-align: center; font-weight: bold; color: #64748b; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; flex-direction: column; line-height: 1.2; }
.outcome-btn.active { background: var(--aggie-blue); color: white; border-color: var(--aggie-blue); transform: scale(1.02); }

/* CALENDAR GRID */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; width: 100%; margin-top: 10px; }
.cal-day { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; border-radius: 4px; background: #f8fafc; border: 1px solid #e2e8f0; position: relative; cursor: default; }
.cal-day.today { border: 2px solid var(--aggie-blue); font-weight: bold; background: white; }
.cal-day.has-log { background: #dbeafe; color: #1e40af; font-weight: bold; cursor: pointer; border-color: #93c5fd; }
.cal-dot { width: 4px; height: 4px; background: #1e40af; border-radius: 50%; margin-top: 2px; }

/* TABLES */
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.admin-table th { text-align: left; padding: 8px; background: #f1f5f9; color: #64748b; }
.admin-table td { padding: 8px; border-bottom: 1px solid #e2e8f0; }
.rank-1 td:nth-child(1) { color: #d97706; font-weight: 900; font-size: 1.2em; } 
.rank-2 td:nth-child(1) { color: #64748b; font-weight: 900; font-size: 1.2em; } 
.rank-3 td:nth-child(1) { color: #b45309; font-weight: 900; font-size: 1.2em; }

/* NAV & MODAL */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: var(--white); border-top: 1px solid #e2e8f0; display: flex; justify-content: space-around; padding: 12px 0; z-index: 1000; padding-bottom: env(safe-area-bottom); }
.nav-item { 
  background: none; 
  border: none; 
  color: #94a3b8; 
  font-size: 10px; 
  font-weight: 700; 
  text-transform: uppercase; 
  cursor: pointer; 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center;
}
.nav-item span { display: block; font-size: 20px; margin-bottom: 4px; }
.nav-item.active { color: var(--aggie-blue); }
.nav-icon { font-size: 20px; margin-bottom: 4px; }
.modal { display: none; position: fixed; z-index: 3000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(15, 23, 42, 0.9); backdrop-filter: blur(2px); -webkit-backgrop-filter: blur(2px); }
.modal-content { background-color: white; margin: 10% auto; width: 90%; max-width: 500px; border-radius: 12px; overflow: hidden; }
.modal-body { padding: 20px; max-height: 70vh; overflow-y: auto; }

/* --- TROPHY CASE MEDALS --- */
.medal-container { display: flex; flex-direction: column; align-items: center; flex: 1; }
.medal-title { font-size: 10px; font-weight: 900; color: #64748b; margin-top: 8px; }
.medal-xp { font-size: 9px; color: #94a3b8; font-weight: bold; }
.medal-coin { width: 45px; height: 45px; border-radius: 50%; background-image: url('Images/Phoenixes_Logo_2026.png'); background-size: 120%; background-position: center; position: relative; }
.medal-rookie { border: 4px solid #64748b; box-shadow: 0 4px 6px rgba(0,0,0,0.2); }
.medal-starter { border: 4px solid #b45309; box-shadow: 0 0 10px rgba(180,83,9,0.5); }
.medal-veteran { border: 4px solid #cbd5e1; box-shadow: 0 0 12px rgba(203,213,225,0.8); }
.medal-pro { border: 4px solid #fbbf24; box-shadow: 0 0 15px rgba(251,191,36,0.9); }
.medal-legend { border: 4px solid #38bdf8; box-shadow: 0 0 20px #38bdf8, inset 0 0 10px rgba(255,255,255,0.5); animation: legend-glow 1.5s infinite alternate; }
.btn-claim-cert { display: none; background: linear-gradient(135deg, var(--aggie-gold) 0%, #d97706 100%); color: white; font-weight: 900; animation: pulse 2s infinite; margin-top: 15px; }

/* ANIMATIONS & PRINTING */
@keyframes legend-glow { 0% { box-shadow: 0 0 10px #38bdf8, inset 0 0 5px rgba(255,255,255,0.5); } 100% { box-shadow: 0 0 25px #0284c7, inset 0 0 15px rgba(255,255,255,0.8); transform: scale(1.05); } }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.02); } 100% { transform: scale(1); } }
@media print {
    body * { visibility: hidden; }
    #printableCertificate, #printableCertificate * { visibility: visible; }
    #printableCertificate { position: absolute; left: 0; top: 0; width: 100%; height: 100%; border: 15px solid #00263A !important; margin: 0; padding: 40px; box-sizing: border-box; }
    .no-print { display: none !important; }
}


/* =======================================================
   EXTRACTED INLINE STYLES AND UTILITIES
   ======================================================= */

/* Utility Classes */
.d-none { display: none; }
.flex-1 { flex: 1; }
.w-100 { width: 100%; }
.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }
.p-0 { padding: 0; }
.font-bold { font-weight: bold; }
.no-underline { text-decoration: none; }
.overflow-x-auto { overflow-x: auto; }
.text-sm { font-size: 12px; }

/* Auth Views */
.auth-title { color: var(--aggie-blue); margin-top: 0; }
.auth-subtitle { color: #64748b; font-size: 14px; margin-bottom: 20px; }
.btn-google { background-color: white; color: #475569; border: 1px solid #cbd5e1; display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 20px; }
.auth-divider { display: flex; align-items: center; margin-bottom: 20px; }
.divider-line { flex: 1; border: none; border-top: 1px solid #e2e8f0; }
.divider-text { padding: 0 10px; color: #94a3b8; font-size: 12px; }
.btn-mb-10 { margin-bottom: 10px; }
.btn-mt-10 { margin-top: 10px; }

/* App Header */
.app-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.app-title { margin: 0; color: var(--aggie-blue); }
.player-info { font-size: 12px; color: #64748b; }
.nav-logout-btn { border: none; background: none; color: #64748b; text-decoration: underline; cursor: pointer; font-size: 12px; font-weight: bold; }

/* Home Dashboard */
.icon-large { font-size: 40px; }
.welcome-title { margin: 0 0 5px 0; font-size: 24px; }
.welcome-subtitle { opacity: 0.9; font-size: 13px; margin-bottom: 5px; }

/* Tracker Dashboard */
.custom-warmup-container { margin-bottom: 8px; }
.tracker-plan-header { margin-top: 20px; color: var(--aggie-blue); }
.session-list { list-style: none; padding: 0; margin-bottom: 20px; }
.workout-summary-box { background: #f1f5f9; padding: 15px; border-radius: 8px; border: 1px solid #cbd5e1; margin-bottom: 15px; }
.time-input-row { display: flex; gap: 10px; margin-bottom: 15px; }
.btn-start-timer { background: var(--success); color: white; }
.schedule-row { display: flex; gap: 10px; margin-bottom: 10px; }
.schedule-input { flex: 1; margin: 0; padding: 8px; font-size: 12px; }
.export-row { display: flex; gap: 10px; }
.btn-export { flex: 1; font-size: 12px; }

/* Stats Dashboard */
.view-title { color: var(--aggie-blue); margin-top: 0; }
.level-display { margin: 0; font-size: 2rem; color: var(--aggie-gold); }
.current-rank-label { margin: 5px 0 15px 0; color: #64748b; font-size: 0.9rem; }
.stats-totals-row { display: flex; justify-content: space-around; margin-top: 15px; }
.stat-number { font-size: 1.2rem; font-weight: bold; color: var(--aggie-blue); }
.stat-label { font-size: 0.7rem; color: #64748b; }
.trophy-header { background: #f8fafc !important; color: var(--aggie-blue) !important; border-bottom: 2px solid #e2e8f0 !important; }
.trophy-flex { display: flex; justify-content: space-between; align-items: flex-end; min-width: 320px; padding: 10px 0 20px 0; }
.medal-locked { opacity: 0.3; filter: grayscale(100%); transition: 0.5s; }
.legend-title-color { color: #0284c7 !important; }
.leaderboard-header { background: var(--aggie-blue) !important; color: white !important; }
.calendar-month-label { font-weight: bold; margin-bottom: 10px; }

/* Coach Dashboard */
.roster-overview-header { background: var(--success) !important; }
.roster-stats-box { display: flex; justify-content: space-between; margin-bottom: 15px; padding: 10px; background: #f1f5f9; border-radius: 6px; }
.roster-stat-val { font-size: 20px; }
.roster-stat-val.active { color: var(--success); }
.roster-stat-val.reps { color: var(--aggie-blue); }
.btn-save-roster { background: var(--success); }
.roster-divider { margin: 20px 0; border: none; border-top: 1px solid #e2e8f0; }
.export-desc { font-size: 12px; color: #64748b; margin-top: 0; }
.btn-export-excel { background: #10b981; }
.staff-header { background: #334155 !important; }
.assistant-list { margin-bottom: 15px; font-size: 13px; }
.add-assistant-row { display: flex; gap: 10px; }
.btn-auto-width { width: auto; }
.btn-padding-10 { padding: 10px; }

/* Admin Dashboard */
.admin-input-row { display: flex; gap: 10px; margin-top: 15px; }
.team-id-input { width: 60px; }
.log-buttons-row { display: flex; gap: 10px; margin-bottom: 15px; }
.log-container { background: #f1f5f9; padding: 10px; border-radius: 6px; font-size: 10px; height: 200px; overflow-y: auto; border: 1px solid #cbd5e1; font-family: monospace; }

/* Modals */
.modal-close-icon { cursor: pointer; font-size: 18px; }

/* Cert Modal */
.cert-modal-bg { background-color: rgba(0,0,0,0.9); }
.cert-content { max-width: 800px; width: 95%; background: transparent; box-shadow: none; margin: 5% auto; }
.cert-border { position: absolute; top: 5px; left: 5px; right: 5px; bottom: 5px; border: 2px solid var(--aggie-gold); pointer-events: none; }
.cert-icon { font-size: 50px; margin-bottom: 10px; }
.cert-title { color: var(--aggie-blue); font-size: 36px; margin: 0 0 10px 0; font-family: 'Georgia', serif; text-transform: uppercase; }
.cert-subtitle { color: #64748b; font-size: 16px; margin-bottom: 30px; }
.cert-player-name { color: var(--aggie-gold); font-size: 40px; border-bottom: 2px solid #e2e8f0; display: inline-block; padding: 0 40px 10px 40px; margin: 0 0 30px 0; }
.cert-body-text { color: #334155; font-size: 18px; line-height: 1.6; max-width: 600px; margin: 0 auto 40px auto; }
.cert-footer { display: flex; justify-content: space-around; align-items: flex-end; margin-top: 50px; }
.cert-date-line { font-size: 16px; border-bottom: 1px solid #94a3b8; width: 150px; padding-bottom: 5px; margin-bottom: 5px; }
.cert-label { font-size: 12px; color: #64748b; text-transform: uppercase; }
.cert-signature-title { color: var(--aggie-blue); margin: 0; font-size: 24px; }
.cert-buttons { margin-top: 20px; display: flex; gap: 10px; justify-content: center; }
.btn-print { width: auto; padding: 10px 20px; background: white; color: var(--aggie-blue); border: 2px solid white; }
.btn-close-cert { width: auto; padding: 10px 20px; margin-top: 0; background: transparent; color: white; border: 1px solid white; }

/* Drill Info Box */
.drill-info-box { position: fixed; bottom: 80px; left: 15px; right: 15px; z-index: 2000; box-shadow: 0 -5px 20px rgba(0,0,0,0.15); }
.drill-info-header { background: white !important; color: var(--aggie-blue) !important; border-bottom: 1px solid #e2e8f0 !important; }
.drill-title { font-weight: 900; }
.close-drill-btn { cursor: pointer; color: #94a3b8; }
.drill-desc { font-size: 13px; margin-top: 0; color: #475569; }
.btn-watch-video { background: #dbeafe; color: #1e40af; width: 100%; }