/* Ascot United FC — Player Sponsorship
   Brand system aligned with app.ascotunitedfc.co.uk (Outfit/DM Sans, navy #0c1b33, gold #d4a843). */
:root {
    --navy: #0c1b33;
    --navy-light: #152238;
    --navy-mid: #1a2d4a;
    --gold: #d4a843;
    --gold-light: #e8c86e;
    --gold-dark: #b8922e;

    --white: #ffffff;
    --off-white: #f7f8fa;
    --grey-50: #f9fafb;
    --grey-100: #f0f2f5;
    --grey-200: #e4e7ec;
    --grey-300: #cdd3dc;
    --grey-400: #98a2b3;
    --grey-500: #6b7280;
    --grey-600: #5a6478;
    --grey-800: #2d3748;

    --green: #198754;
    --green-bg: #e8f5e9;
    --green-dark: #2e7d32;
    --danger: #dc3545;
    --danger-bg: #ffebee;
    --danger-dark: #c62828;
    --warning: #e65100;
    --warning-bg: #fff3e0;
    --warning-dark: #bf360c;

    /* aliases used by existing markup */
    --ink: #1b2a41;
    --muted: var(--grey-600);
    --line: var(--grey-200);
    --bg: var(--off-white);

    --font-display: 'Outfit', system-ui, sans-serif;
    --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-pill: 100px;

    --shadow-sm: 0 1px 3px rgba(12, 27, 51, 0.06);
    --shadow-md: 0 4px 16px rgba(12, 27, 51, 0.08);
    --shadow-lg: 0 8px 32px rgba(12, 27, 51, 0.12);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--grey-800);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .card-name { font-family: var(--font-display); }
a { color: var(--navy); }
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.main { padding: 32px 20px 64px; }

/* Header */
/* v1.8.0: the header is the shared *.ascotunitedfc.co.uk one, in aufc-header.css (loaded after this file). */
.inline-form { display: inline; margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: #fff; padding: 24px 0; margin-top: 48px; }
.site-footer p { color: var(--muted); font-size: 13px; margin: 0; text-align: center; }

/* Flash */
.flash {
    background: var(--warning-bg); border: 1px solid #ffe0b2; color: var(--warning-dark);
    padding: 12px 16px; border-radius: var(--radius); margin-top: 20px; font-size: 14px;
}

/* Hero */
.hero { text-align: center; padding: 18px 0 30px; }
.hero h1 { font-size: 34px; font-weight: 800; margin: 0 0 10px; color: var(--navy); letter-spacing: -.5px; }
.hero p { color: var(--muted); margin: 0 auto; max-width: 640px; font-size: 16px; }
.hero .stats { display: inline-flex; gap: 40px; margin-top: 24px; }
.hero .stat b { display: block; font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--navy); }
.hero .stat span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }

/* Team filter bar (sticky) */
.team-filter {
    position: sticky; top: 0; z-index: 20;
    background: rgba(245,246,248,.96); backdrop-filter: blur(6px);
    margin: 0 -20px 8px; padding: 12px 20px;
    border-bottom: 1px solid var(--line);
}
.team-filter-inner { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-pill {
    display: inline-flex; align-items: center; gap: 8px;
    border: 1px solid var(--line); background: #fff; color: var(--ink);
    padding: 8px 14px; border-radius: var(--radius-pill, 100px);
    font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.filter-pill:hover { border-color: var(--gold); }
.filter-pill.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.filter-pill .pill-count {
    background: var(--gold); color: var(--navy); font-size: 12px; font-weight: 800;
    min-width: 20px; text-align: center; padding: 1px 6px; border-radius: 20px;
}
.filter-pill.active .pill-count { background: var(--gold); color: var(--navy); }
@media (max-width: 640px) {
    /* Narrow screens: stack the pills vertically so the full team name is always visible.
       Non-sticky here so the list doesn't hog the viewport while scrolling. */
    .team-filter { position: static; background: transparent; backdrop-filter: none; border-bottom: none; margin: 0 0 16px; padding: 0; }
    .team-filter-inner { flex-direction: column; align-items: stretch; gap: 8px; }
    .filter-pill { width: 100%; justify-content: space-between; white-space: normal; text-align: left; }
}

/* Team sections */
.team-section { margin-top: 40px; }
.team-title { display: flex; align-items: center; gap: 14px; margin: 0 0 20px; color: var(--navy); font-size: 24px; font-weight: 700; }
.team-title::after { content: ""; flex: 1; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--gold), transparent); }

/* Card grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
    overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.card.sponsored { opacity: .97; }
.card-photo { position: relative; aspect-ratio: 3/4; background: var(--navy-light); overflow: hidden; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-photo .no-photo { display: flex; align-items: center; justify-content: center; height: 100%; color: #55627a; font-family: var(--font-display); font-size: 46px; font-weight: 800; }
.badge { position: absolute; top: 12px; left: 12px; padding: 5px 11px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.badge.sponsored { background: var(--green); color: #fff; }
.badge.number { top: 12px; left: auto; right: 12px; background: var(--gold); color: var(--navy); font-family: var(--font-display); }
.card-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-name { font-size: 18px; font-weight: 700; margin: 0; color: var(--navy); }
.card-pos { font-size: 13px; color: var(--muted); }
.card-blurb { font-size: 13px; color: var(--muted); flex: 1; }
.card-sponsor { font-size: 13px; color: var(--green-dark); font-weight: 600; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.price { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--navy); }

/* Segmented toggle (Individual / Business) */
.seg-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-pill, 100px); overflow: hidden; background: #fff; }
.seg-toggle label { margin: 0; padding: 8px 20px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); transition: background .15s, color .15s; }
.seg-toggle label.on { background: var(--navy); color: #fff; }
.seg-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }

/* Business sponsor on public card */
.sponsor-business { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.sponsor-business img { max-height: 34px; max-width: 90px; object-fit: contain; border-radius: 4px; background: #fff; }
.sponsor-business a { color: var(--green); font-weight: 600; font-size: 13px; text-decoration: none; }
.sponsor-business a:hover { text-decoration: underline; }

/* Carousel (public card) */
.carousel { position: absolute; inset: 0; overflow: hidden; }
.carousel-track { display: flex; height: 100%; transition: transform .35s cubic-bezier(0.4,0,0.2,1); }
.carousel-slide { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
    background: rgba(12,27,51,.55); color: #fff; font-size: 20px; line-height: 1;
    display: flex; align-items: center; justify-content: center; transition: background .15s; padding: 0;
}
.carousel-arrow:hover { background: rgba(12,27,51,.85); }
.carousel-arrow.prev { left: 8px; }
.carousel-arrow.next { right: 8px; }
.carousel-dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; z-index: 2; }
.carousel-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.55); transition: background .15s; }
.carousel-dot.active { background: var(--gold); }

/* Admin image manager */
.img-manage { display: flex; flex-wrap: wrap; gap: 12px; }
.img-thumb { position: relative; width: 110px; height: 146px; border-radius: 10px; overflow: hidden; border: 2px solid var(--line); background: var(--navy-light); }
.img-thumb.primary { border-color: var(--gold); }
.img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-primary-badge { position: absolute; top: 6px; left: 6px; background: var(--gold); color: var(--navy); font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 10px; text-transform: uppercase; letter-spacing: .3px; }
.img-thumb-actions { position: absolute; bottom: 6px; right: 6px; display: flex; gap: 4px; }
.img-thumb-actions form { margin: 0; }
.img-thumb-actions .btn.small { padding: 3px 8px; font-size: 12px; }

/* Multi-tier list */
.tier-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tier-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.tier-name { font-size: 14px; font-weight: 600; color: var(--grey-800); }
.tier-price { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--navy); }
.tier-taken { font-size: 11px; font-weight: 700; color: var(--green-dark); text-transform: uppercase; letter-spacing: .5px; }

/* Buttons */
.btn {
    display: inline-block; background: var(--gold); color: var(--navy); border: none;
    padding: 10px 18px; border-radius: var(--radius-sm); font-family: var(--font-body); font-weight: 700; font-size: 14px;
    text-decoration: none; cursor: pointer; transition: var(--transition);
}
.btn:hover { background: var(--gold-dark); color: #fff; box-shadow: var(--shadow-md); }
.btn.block { display: block; width: 100%; text-align: center; }
.btn.secondary { background: var(--grey-100); color: var(--navy); }
.btn.secondary:hover { background: var(--grey-200); color: var(--navy); box-shadow: none; }
.btn.danger { background: var(--danger-bg); color: var(--danger-dark); }
.btn.danger:hover { background: #ffcdd2; color: var(--danger-dark); }
.btn.small { padding: 7px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* Panels & forms */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); }
.panel.narrow { max-width: 520px; margin: 24px auto; }
.panel h1 { margin-top: 0; color: var(--navy); font-weight: 700; }
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; color: var(--grey-800); }
.form-row input[type=text], .form-row input[type=email], .form-row input[type=password],
.form-row input[type=number], .form-row textarea, .form-row select {
    width: 100%; padding: 11px 13px; border: 1px solid var(--grey-300); border-radius: var(--radius-sm); font-size: 15px; font-family: inherit; color: var(--grey-800);
    transition: var(--transition);
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,168,67,.18); }
.form-row textarea { min-height: 92px; resize: vertical; }
.form-row .hint { color: var(--muted); font-size: 13px; margin-top: 4px; }
.check-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.check-row input { width: 18px; height: 18px; accent-color: var(--gold-dark); }
.field-validation-error, .validation-summary-errors { color: var(--danger-dark); font-size: 13px; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }

/* Checkout summary */
.checkout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; }
.checkout .summary { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.checkout .summary img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.checkout .summary .sum-body { padding: 16px 18px; }
@media (max-width: 720px) { .checkout { grid-template-columns: 1fr; } .hero .stats { gap: 26px; } }

/* Tables (admin) */
.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.table th, .table td { text-align: left; padding: 12px 15px; border-bottom: 1px solid var(--line); font-size: 14px; }
.table th { background: var(--grey-50); color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .6px; font-weight: 700; }
.table tr:last-child td { border-bottom: none; }
.pill { padding: 4px 10px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.pill.available { background: var(--grey-100); color: var(--grey-600); }
.pill.pending { background: #fff3cd; color: #856404; }
.pill.sponsored { background: var(--green-bg); color: var(--green-dark); }

/* Dashboard stat tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 18px; margin-bottom: 28px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); }
.tile b { display: block; font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--navy); }
.tile span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.tile.gold { background: var(--navy); border-color: var(--navy); }
.tile.gold b { color: var(--gold); }
.tile.gold span { color: #cdd5e0; }

.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.toolbar h1 { margin: 0; color: var(--navy); font-weight: 700; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Admin: sponsorship option rows */
.opt-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.opt-row:last-child { border-bottom: none; }
.opt-name { font-weight: 600; min-width: 140px; }
.opt-price { font-family: var(--font-display); font-weight: 700; color: var(--navy); min-width: 60px; }
.opt-actions { margin-left: auto; }

details.inline-editor { margin: 0; }
details.inline-editor summary { cursor: pointer; color: var(--navy); font-weight: 600; }
.mini-form { display: grid; gap: 8px; margin-top: 10px; padding: 12px; background: var(--grey-50); border: 1px solid var(--line); border-radius: var(--radius); }
.mini-form input, .mini-form textarea { padding: 9px 11px; border: 1px solid var(--grey-300); border-radius: var(--radius-sm); font-family: inherit; font-size: 14px; }
