/* ── CoachCarter Instructor Shared Styles ─────────────────────────────────── */

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* CSS Variables */
:root {
  /* Brand colours (overridden by branding.js if school branding is set) */
  --brand-primary: #f97316;
  --brand-secondary: #1e3a5f;
  --brand-accent: #3b82f6;

  --primary:    #262626;
  --accent:     #f58321;
  --accent-dk:  #e07518;
  --accent-lt:  #fff4ec;
  --accent-mid: rgba(245,131,33,0.12);
  --muted:      #797879;
  --border:     #e0e0e0;
  --bg:         #ffffff;
  --surface:    #f9f9f9;
  --white:      #ffffff;
  --green:      #22c55e;
  --green-lt:   #f0fdf4;
  --red:        #ef4444;
  --red-lt:     #fef2f2;
  --blue:       #3b82f6;
  --blue-lt:    #eff6ff;
  --font-head:  'Bricolage Grotesque', system-ui, -apple-system, sans-serif;
  --font-body:  'Lato', system-ui, -apple-system, sans-serif;
  --radius:     14px;
}

/* Base */
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--primary);
  min-height: 100vh;
  overscroll-behavior: none;
}

/* Utility */
.hidden { display: none !important; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ── Site Nav ──────────────────────────────────────────────────────────────── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  padding: 0 32px; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(38,38,38,0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.site-nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.site-nav-logo img { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; background: rgba(255,255,255,0.08); padding: 4px; }
.site-nav-logo span { font-family: var(--font-head); font-size: 1.1rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.site-nav-logo span em { font-style: normal; color: var(--brand-primary, var(--accent)); }
.site-nav-links { display: flex; align-items: center; gap: 6px; }
.site-nav-link {
  color: rgba(255,255,255,0.6); font-family: var(--font-body); font-weight: 500;
  font-size: 0.83rem; padding: 7px 14px; border-radius: 100px;
  border: 1px solid transparent; text-decoration: none; transition: all 0.18s;
  white-space: nowrap; background: transparent; cursor: pointer;
}
.site-nav-link:hover { color: #fff; border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.05); }
.site-nav-link.primary { background: var(--brand-primary, var(--accent)); color: #fff; border-color: var(--brand-primary, var(--accent)); font-weight: 600; }
.site-nav-link.primary:hover { background: var(--accent-dk); border-color: var(--accent-dk); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(245,131,33,0.35); }
@media (max-width: 600px) { .site-nav { padding: 0 16px; } .site-nav-link:not(.primary):not(.back) { display: none; } }

/* ── Portal Header ─────────────────────────────────────────────────────────── */
.portal-header {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 0 20px; display: flex; align-items: center;
  justify-content: space-between; height: 60px;
  position: fixed; top: 64px; left: 0; right: 0; z-index: 200;
}
.portal-header h2 {
  font-family: var(--font-head); font-size: 1.15rem;
  font-weight: 700; letter-spacing: -0.02em;
}
.portal-tabs { display: flex; gap: 4px; }
.portal-tab {
  padding: 7px 14px; border-radius: 100px; font-size: 0.82rem;
  font-weight: 500; color: var(--muted); background: none;
  border: 1px solid var(--border); cursor: pointer; transition: all 0.15s;
  font-family: var(--font-body); text-decoration: none;
}
.portal-tab:hover { border-color: var(--brand-primary, var(--accent)); color: var(--brand-primary, var(--accent)); }
.portal-tab.active { background: var(--brand-primary, var(--accent)); color: #fff; border-color: var(--brand-primary, var(--accent)); }

/* ── Dark Mode ────────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root:not(.light-mode) {
    --primary:    #e8e8e8;
    --accent:     #f58321;
    --accent-dk:  #e07518;
    --accent-lt:  #2e2014;
    --accent-mid: rgba(245,131,33,0.18);
    --muted:      #9e9e9e;
    --border:     #3a3a3a;
    --bg:         #1a1a1a;
    --surface:    #242424;
    --white:      #2e2e2e;
    --green:      #4ade80;
    --green-lt:   #14261a;
    --red:        #f87171;
    --red-lt:     #2a1515;
    --blue:       #60a5fa;
    --blue-lt:    #1a2332;
    color-scheme: dark;
  }
  :root:not(.light-mode) .site-nav { background: rgba(26,26,26,0.95); }
  :root:not(.light-mode) .portal-header { background: var(--surface); }
  :root:not(.light-mode) img { opacity: 0.92; }
}
:root.dark-mode {
  --primary:    #e8e8e8;
  --accent:     #f58321;
  --accent-dk:  #e07518;
  --accent-lt:  #2e2014;
  --accent-mid: rgba(245,131,33,0.18);
  --muted:      #9e9e9e;
  --border:     #3a3a3a;
  --bg:         #1a1a1a;
  --surface:    #242424;
  --white:      #2e2e2e;
  --green:      #4ade80;
  --green-lt:   #14261a;
  --red:        #f87171;
  --red-lt:     #2a1515;
  --blue:       #60a5fa;
  --blue-lt:    #1a2332;
  color-scheme: dark;
}
:root.dark-mode .site-nav { background: rgba(26,26,26,0.95); }
:root.dark-mode .portal-header { background: var(--surface); }
:root.dark-mode img { opacity: 0.92; }
