*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green-dark:  #0d1b3e;
  --green-mid:   #1a3a7c;
  --green-light: #3b5bdb;
  --green-pale:  #e8eeff;
  --gold:        #4dabf7;
  --gold-light:  #a5d8ff;
  --cream:       #f4f6fb;
  --text:        #1c1c2e;
  --text-muted:  #6b7280;
  --white:       #ffffff;
  --border:      #dde3f0;
  --radius:      10px;
  --shadow:      0 2px 12px rgba(13,27,62,0.1);
}

body { font-family: 'DM Sans', sans-serif; background: var(--cream); color: var(--text); min-height: 100vh; }

/* ── Nav ── */
nav {
  background: #0d1b3e;
  padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo-img { width: 44px; height: 44px; object-fit: contain; border-radius: 50%; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4)); }
.nav-title { font-family: 'Playfair Display', serif; color: var(--white); font-size: 1.1rem; font-weight: 600; }
.nav-links { display: flex; gap: 0.5rem; }
.nav-link  { color: rgba(255,255,255,0.75); text-decoration: none; padding: 0.4rem 1rem; border-radius: 6px; font-size: 0.9rem; font-weight: 500; transition: all 0.15s; }
.nav-link:hover  { color: var(--white); background: rgba(255,255,255,0.1); }
.nav-link.active { color: #4dabf7; background: rgba(77,171,247,0.15); }

/* ── Layout ── */
.page { max-width: 1100px; margin: 0 auto; padding: 2.5rem 1.5rem; }

/* ── Hero ── */
.hero { background: linear-gradient(rgba(13,27,62,0.35), rgba(10,22,80,0.50)), url('/images/banner.png') center/cover no-repeat; color: var(--white); padding: 4rem 2.5rem; margin-bottom: 2rem; position: relative; overflow: hidden; min-height: 340px; display: flex; flex-direction: column; justify-content: flex-end; width: 100vw; margin-left: calc(-50vw + 50%); border-radius: 0; }

.hero-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 0.75rem; }
.hero-inner { max-width: 1100px; margin: 0 auto; width: 100%; padding: 0 1.5rem; }
.hero h1 { font-family: 'Playfair Display', serif; font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; line-height: 1.2; margin-bottom: 0.75rem; }
.hero p  { color: rgba(255,255,255,0.75); font-size: 1rem; max-width: 520px; line-height: 1.65; }
.hero-actions { margin-top: 1.75rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ── Cards ── */
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.pool-card { border-left: 4px solid #4dabf7; }

/* ── Stats ── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; text-align: center; }
.stat-num  { font-family: 'Playfair Display', serif; font-size: 2.2rem; font-weight: 700; color: #1a3a7c; line-height: 1; }
.stat-label{ font-size: 0.8rem; font-weight: 500; color: var(--text-muted); margin-top: 0.4rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* ── Progress ── */
.progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.progress-wrap   { background: #e5e7eb; border-radius: 99px; height: 8px; overflow: hidden; }
.progress-bar    { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #4dabf7, #3b5bdb); transition: width 0.4s ease; }
.progress-note   { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.6rem; }
.progress-note.full { color: #991b1b; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 0.65rem 1.5rem; border-radius: 8px; font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 600; cursor: pointer; border: none; text-decoration: none; transition: all 0.15s; }
.btn-primary { background: #3b5bdb; color: var(--white); }
.btn-primary:hover { background: #0d1b3e; }
.btn-gold    { background: #4dabf7; color: #0d1b3e; }
.btn-gold:hover { background: #74c0fc; }
.btn-outline { background: transparent; color: #3b5bdb; border: 1.5px solid #3b5bdb; }
.btn-outline:hover { background: #e8eeff; }
.btn-ghost   { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.9); border: 1px solid rgba(255,255,255,0.3); }
.btn-ghost:hover { background: rgba(255,255,255,0.2); }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }

/* ── Forms ── */
.form-group  { margin-bottom: 1.25rem; }
.form-label  { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; }
.req         { color: #c0392b; }
.form-input, .form-select { width: 100%; padding: 0.6rem 0.9rem; border: 1.5px solid var(--border); border-radius: 8px; font-family: 'DM Sans', sans-serif; font-size: 0.9rem; color: var(--text); background: var(--white); transition: border-color 0.15s; appearance: none; }
.form-input:focus, .form-select:focus { outline: none; border-color: #3b5bdb; box-shadow: 0 0 0 3px rgba(59,91,219,0.12); }
.form-row    { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-intro  { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 1.5rem; line-height: 1.6; }
@media(max-width:600px) { .form-row { grid-template-columns: 1fr; } }

/* ── Alerts ── */
.alert { padding: 0.9rem 1.2rem; border-radius: 8px; font-size: 0.9rem; margin-bottom: 1.25rem; display: none; }
.alert.show       { display: block; }
.alert-success    { background: #e8eeff; border: 1px solid #a3d9b1; color: var(--green-dark); }
.alert-error      { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }

/* ── Badges ── */
.badge       { display: inline-block; padding: 0.2rem 0.65rem; border-radius: 20px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; }
.badge-green { background: #e8eeff; color: var(--green-dark); }
.badge-gold  { background: rgba(201,168,76,0.15); color: #7a5c10; }
.badge-gray  { background: #f3f4f6; color: var(--text-muted); }

/* ── Tabs ── */
.tabs    { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 2rem; }
.tab-btn { padding: 0.75rem 1.5rem; font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 600; color: var(--text-muted); background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; cursor: pointer; transition: all 0.15s; }
.tab-btn:hover  { color: #3b5bdb; }
.tab-btn.active { color: #3b5bdb; border-bottom-color: #3b5bdb; }
.tab-panel      { display: none; }
.tab-panel.active { display: block; }

/* ── Player blocks ── */
.player-block { background: var(--cream); border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1rem; }
.player-num   { font-size: 0.78rem; font-weight: 700; color: var(--green-mid); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.75rem; }

/* ── Spinner ── */
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,0.4); border-top-color: white; border-radius: 50%; animation: spin 0.7s linear infinite; display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Overlay / Confirm ── */
.overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; align-items: center; justify-content: center; }
.overlay.show { display: flex; }
.confirm-card    { max-width: 420px; width: 90%; text-align: center; padding: 2rem; }
.confirm-title   { font-family: 'Playfair Display', serif; font-size: 1.4rem; color: var(--green-dark); margin-bottom: 0.75rem; }
.confirm-msg     { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; margin-bottom: 0.5rem; }
.confirm-jira    { color: var(--text-muted); font-size: 0.8rem; margin-bottom: 1.5rem; }
.confirm-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* ── Dashboard ── */
.dash-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; }
.teams-grid  { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }
.team-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.team-name   { font-family: 'Playfair Display', serif; font-size: 1.05rem; font-weight: 600; color: var(--green-dark); }
.team-num    { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.hole-label  { font-size: 1.05rem; font-weight: 700; color: #1a3a7c; }
.player-row  { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0; }
.player-row.bordered { border-bottom: 1px solid var(--border); }
.player-avatar { width: 32px; height: 32px; border-radius: 50%; background: #e8eeff; display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; color: var(--green-dark); flex-shrink: 0; }
.player-avatar.empty { background: transparent; border: 1.5px dashed var(--border); }
.player-info  { flex: 1; min-width: 0; }
.player-name  { font-size: 0.88rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-email { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-hcp   { font-size: 0.75rem; color: var(--text-muted); flex-shrink: 0; }

/* ── Info grid ── */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.info-icon { font-size: 1.8rem; margin-bottom: 0.75rem; }
.info-grid h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.4rem; }
.info-grid p  { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

/* ── Hole table ── */
.hole-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.hole-table thead tr { background: #e8eeff; }
.hole-table th { padding: 0.6rem 1rem; text-align: left; font-weight: 600; color: #0d1b3e; border-bottom: 1px solid var(--border); }
.hole-table td { padding: 0.55rem 1rem; border-bottom: 1px solid var(--border); }
.hole-table .hole-num { font-weight: 600; color: #1a3a7c; }
.th-sub { font-size: 0.75rem; font-weight: 400; color: var(--text-muted); }

/* ── Misc ── */
.section-title { font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 600; color: #0d1b3e; margin-bottom: 1.25rem; }
.back-link     { font-size: 0.85rem; color: var(--text-muted); text-decoration: none; }
.back-link:hover { color: #3b5bdb; }
.divider       { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }

/* ── Radio buttons ── */
.radio-group { display: flex; gap: 1.5rem; align-items: center; margin-top: 0.3rem; }
.radio-label {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.9rem; font-weight: 500; cursor: pointer; color: var(--text);
}
.radio-label input[type=radio] {
  width: 16px; height: 16px; accent-color: #3b5bdb; cursor: pointer;
}

/* ── ATS Employee Highlight ── */
.ats-player { background: linear-gradient(90deg, rgba(220,38,38,0.07) 0%, rgba(220,38,38,0.02) 100%); border-left: 3px solid #dc2626; padding-left: calc(0.75rem - 3px); }
.ats-avatar { background: #dc2626 !important; color: white !important; }
.ats-badge  { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em; color: #991b1b; background: #fef2f2; border: 1px solid #fca5a5; border-radius: 4px; padding: 2px 6px; flex-shrink: 0; }

/* ── Vendor Highlight ── */
.vendor-player { background: linear-gradient(90deg, rgba(234,179,8,0.1) 0%, rgba(234,179,8,0.03) 100%); border-left: 3px solid #ca8a04; padding-left: calc(0.75rem - 3px); }
.vendor-avatar { background: #ca8a04 !important; color: white !important; }
.vendor-badge  { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em; color: #854d0e; background: #fef9c3; border: 1px solid #fde047; border-radius: 4px; padding: 2px 6px; flex-shrink: 0; }

/* ── Dashboard event info responsive ── */
@media (max-width: 700px) {
  .event-info-grid { grid-template-columns: 1fr !important; }
}

/* ── Stat card colors ── */
.stat-card:nth-child(2) .stat-num { color: #dc2626; }
.stat-card:nth-child(3) .stat-num { color: #16a34a; }
.stat-card:nth-child(4) .stat-num { color: #1a3a7c; }
.stat-card:nth-child(2) .stat-label { color: #dc2626; }
.stat-card:nth-child(3) .stat-label { color: #16a34a; }
.stat-card:nth-child(4) .stat-label { color: #1a3a7c; }
