:root {
    --gsb-pink: #EF3C97;
    --gsb-pink-dark: #C4207A;
    --gsb-pink-light: #FDE8F4;
    --gsb-white: #FFFFFF;
    --gsb-gray: #f5f5f5;
}

body {
    font-family: 'Sarabun', sans-serif;
    background: #f8f4f7;
    color: #333;
}
body:has(.auth-content) {
    background: linear-gradient(135deg, var(--gsb-pink-dark) 0%, var(--gsb-pink) 100%);
}

/* Navbar */
.gsb-navbar {
    background: var(--gsb-pink-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.gsb-navbar .navbar-brand { color: #fff; font-size: 1rem; }
.gsb-navbar .nav-link { color: rgba(255,255,255,0.85); font-size: 0.9rem; }
.gsb-navbar .nav-link:hover { color: #ffd6ec; }

@media (max-width: 991.98px) {
    .gsb-navbar .navbar-brand-text { display: none; }
}

.gsb-oc-link {
    color: #333;
    font-size: 0.9rem;
    transition: background 0.12s;
}
.gsb-oc-link:hover { background: var(--gsb-pink-light); color: var(--gsb-pink-dark); }
.gsb-oc-link i { font-size: 1rem; width: 1.2rem; color: var(--gsb-pink); flex-shrink: 0; }

/* Main content */
.main-content {
    padding: 1.5rem;
    min-height: calc(100vh - 60px);
}
.auth-content {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gsb-pink-dark) 0%, var(--gsb-pink) 100%);
}

/* Auth card */
.auth-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    padding: 2.5rem;
    width: 100%;
    max-width: 480px;
}
.auth-card .logo-header { text-align: center; margin-bottom: 1.5rem; }
.auth-card .logo-header h4 { color: var(--gsb-pink); font-weight: 700; }
.auth-card .logo-header p { color: #888; font-size: 0.85rem; }

.auth-card-lg { max-width: 680px; }

/* Stat cards */
.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    border-left: 4px solid var(--gsb-pink);
}
.stat-card.orange { border-left-color: #f97316; }
.stat-card.blue   { border-left-color: #0d6efd; }
.stat-card.red    { border-left-color: #dc3545; }
.stat-card h2 { font-size: 2rem; font-weight: 700; color: var(--gsb-pink); margin: 0; }
.stat-card.orange h2 { color: #f97316; }
.stat-card.blue h2   { color: #0d6efd; }
.stat-card.red h2    { color: #dc3545; }
.stat-card p { margin: 0; color: #888; font-size: 0.85rem; }

/* Team card */
.team-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 1.25rem;
    height: 100%;
    border-top: 4px solid var(--gsb-pink);
    transition: transform 0.15s;
}
.team-card:hover { transform: translateY(-2px); }
.team-card.football   { border-top-color: #0d6efd; }
.team-card.volleyball { border-top-color: #f97316; }
.team-card.basketball { border-top-color: #dc3545; }

/* Buttons */
.btn-gsb { background: var(--gsb-pink); color: #fff; border: none; }
.btn-gsb:hover { background: var(--gsb-pink-dark); color: #fff; }
.btn-gsb-outline {
    background: transparent;
    color: var(--gsb-pink);
    border: 1.5px solid var(--gsb-pink);
}
.btn-gsb-outline:hover { background: var(--gsb-pink); color: #fff; }

/* Status badges */
.badge-pending   { background: #ffc107; color: #333; }
.badge-submitted { background: #0d6efd; color: #fff; }
.badge-approved  { background: var(--gsb-pink); color: #fff; }
.badge-rejected  { background: #dc3545; color: #fff; }
.badge-cancelled { background: #6c757d; color: #fff; }
.badge-blocked   { background: #212529; color: #fff; }

/* Page header */
.page-header {
    background: #fff;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.page-header h5 { margin: 0; font-weight: 600; color: var(--gsb-pink); }

/* Table */
.table-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    overflow: hidden;
}
.table-card .table { margin: 0; }
.table-card .table th { background: #fdf0f8; font-weight: 600; font-size: 0.85rem; color: var(--gsb-pink-dark); }

/* Player image */
.player-img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--gsb-pink);
}
.player-img-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fde8f4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gsb-pink);
    font-size: 1.25rem;
}

/* Form */
.form-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 1.5rem;
}
.form-label { font-weight: 500; font-size: 0.9rem; }
.section-label {
    color: var(--gsb-pink);
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 2px solid var(--gsb-pink-light);
    padding-bottom: 0.25rem;
    margin-bottom: 1rem;
}

/* Input focus */
.form-control:focus, .form-select:focus {
    border-color: var(--gsb-pink);
    box-shadow: 0 0 0 0.2rem rgba(229, 0, 126, 0.15);
}

/* Autocomplete */
.autocomplete-list {
    position: absolute;
    z-index: 1000;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 240px;
    overflow-y: auto;
    width: 100%;
}
.autocomplete-item {
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
}
.autocomplete-item:hover { background: var(--gsb-pink-light); color: var(--gsb-pink-dark); }
.autocomplete-item small { color: #888; }

/* Sport icons */
.sport-icon { font-size: 2rem; }

/* Alert */
.alert { border-radius: 8px; }

/* Highlight */
.highlight-row { background: #fff8e1 !important; }

/* Link color */
a { color: var(--gsb-pink); }
a:hover { color: var(--gsb-pink-dark); }

/* Navbar active */
.gsb-navbar .nav-link.active { color: #fff; font-weight: 600; }

/* Bootstrap primary override for this project */
.btn-outline-success { color: var(--gsb-pink); border-color: var(--gsb-pink); }
.btn-outline-success:hover { background: var(--gsb-pink); border-color: var(--gsb-pink); color: #fff; }

/* Player grid wrapper — outer border like a table */
.player-grid-wrapper {
    background: #fff;
    border: 2px solid #888;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
/* Each cell separated by borders */
.player-grid-cell {
    border-right: 1.5px solid #aaa;
    border-bottom: 1.5px solid #aaa;
}
.player-grid-cell:nth-child(5n) { border-right: none; }
.player-grid-cell:nth-last-child(-n+5) { border-bottom: none; }

/* Player grid cards */
.player-grid-card {
    background: #fff;
    overflow: hidden;
    text-align: center;
    font-size: 0.78rem;
    position: relative;
    border-radius: 0;
    border: none;
}
.player-grid-photo {
    width: 100%;
    aspect-ratio: 1/1;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1.5px solid #aaa;
}
.player-grid-photo img {
    width: 100%; height: 100%; object-fit: cover;
}
.player-grid-photo .bi { font-size: 2.5rem; color: #bbb; }
.player-grid-photo .player-placeholder {
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.55;
}
.player-grid-info {
    padding: 5px 7px 3px;
    line-height: 1.8;
    color: #333;
    text-align: left;
}
.info-label {
    font-size: 0.72rem;
    color: #555;
    font-weight: 600;
}
.player-grid-info .info-line {
    border-bottom: 1px solid #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.75rem;
    padding-bottom: 1px;
    margin-bottom: 1px;
}
.player-grid-info .info-line:last-child { border-bottom: none; }
.player-grid-actions {
    display: flex;
    gap: 3px;
    padding: 4px 6px;
    justify-content: flex-end;
    background: #f9f9f9;
    border-top: 1px solid #ddd;
}
.pgbtn { padding: 1px 5px !important; font-size: .7rem !important; }

.player-grid-empty {
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
    color: inherit;
}
.player-grid-empty:hover { background: #fff5fb; color: inherit; }
.player-grid-empty .player-grid-photo { background: #fafafa; position: relative; }
.player-grid-empty .player-grid-photo .player-placeholder { opacity: 0.35; }
.player-grid-empty .player-grid-photo::after {
    content: '+';
    position: absolute;
    font-size: 2rem;
    font-weight: 300;
    color: var(--gsb-pink);
    opacity: 0;
    transition: opacity 0.15s;
}
.player-grid-empty:hover .player-grid-photo::after { opacity: 0.85; }
.player-grid-empty:hover .player-grid-photo .player-placeholder { opacity: 0.2; }
.slot-number {
    position: absolute;
    top: 3px; left: 5px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #aaa;
    z-index: 1;
    background: rgba(255,255,255,0.7);
    padding: 0 2px;
    border-radius: 3px;
}

/* Sport type selector buttons */
.btn-outline-sport {
    border: 2px solid #dee2e6;
    color: #444;
    background: #fff;
    border-radius: 12px;
    transition: all 0.18s;
}
.btn-outline-sport:hover {
    border-color: var(--gsb-pink);
    background: var(--gsb-pink-light);
    color: var(--gsb-pink);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239,60,151,0.15);
}
.btn-check:checked + .btn-outline-sport {
    border-color: var(--gsb-pink);
    background: var(--gsb-pink);
    color: #fff;
    box-shadow: 0 4px 16px rgba(239,60,151,0.35);
    transform: translateY(-2px);
}

/* ─── Admin Sidebar Layout ─── */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 56px);
}

.admin-sidebar {
    width: 220px;
    min-width: 220px;
    background: #fff;
    border-right: 1.5px solid #f0e8f4;
    display: flex;
    flex-direction: column;
    padding: 1rem 0 2rem;
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
    z-index: 100;
}

.sidebar-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    padding: 0.5rem 1rem 0.25rem;
}

.sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 0 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    color: #555;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    margin-bottom: 2px;
}
.sidebar-link i { font-size: 1rem; width: 1.1rem; text-align: center; flex-shrink: 0; }
.sidebar-link:hover { background: var(--gsb-pink-light); color: var(--gsb-pink-dark); text-decoration: none; }
.sidebar-link.active { background: var(--gsb-pink); color: #fff; font-weight: 600; }
.sidebar-link.active i { color: #fff; }

.sidebar-divider {
    height: 1px;
    background: #f0e8f4;
    margin: 0.6rem 1rem;
}

.admin-main {
    flex: 1;
    min-width: 0;
    padding: 1.5rem;
    background: #f8f4f7;
}

/* Mobile sidebar toggle button */
.admin-sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1.5px solid #e0d0ea;
    border-radius: 8px;
    background: #fff;
    color: var(--gsb-pink-dark);
    font-size: 1.2rem;
    cursor: pointer;
    margin-bottom: 1rem;
    line-height: 1;
    padding: 0;
}
.admin-sidebar-toggle:hover { background: var(--gsb-pink-light); }

/* Mobile overlay */
.admin-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 99;
}
.admin-sidebar-overlay.show { display: block; }

@media (max-width: 768px) {
    .admin-sidebar {
        position: fixed;
        top: 56px;
        left: -220px;
        height: calc(100vh - 56px);
        transition: left 0.25s ease;
        box-shadow: 4px 0 16px rgba(0,0,0,0.12);
        z-index: 100;
    }
    .admin-sidebar.show { left: 0; }
    .admin-sidebar-toggle { display: flex; }
}

/* ─── Status Timeline ─── */
.status-timeline { display: flex; flex-direction: column; gap: 0; }
.status-timeline-item {
    display: flex;
    gap: 12px;
    padding-bottom: 14px;
    position: relative;
}
.status-timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 18px;
    bottom: 0;
    width: 2px;
    background: #eee;
}
.status-timeline-dot {
    width: 16px; height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 3px;
    border: 2px solid #ddd;
    background: #fff;
}
.status-timeline-dot.pending   { background: #ffc107; border-color: #ffc107; }
.status-timeline-dot.submitted { background: #0d6efd; border-color: #0d6efd; }
.status-timeline-dot.approved  { background: #2e7d32; border-color: #2e7d32; }
.status-timeline-dot.rejected  { background: #c62828; border-color: #c62828; }
.status-timeline-dot.cancelled { background: #6c757d; border-color: #6c757d; }
.status-timeline-dot.blocked   { background: #212529; border-color: #212529; }
.status-timeline-dot.other     { background: #888; border-color: #888; }
.status-timeline-body { flex: 1; min-width: 0; }
