/* =====================================================
   CourtSync — Beach Tennis Custom CSS
   Paleta: Verde Areia + Azul Oceano + Areia/Branco
===================================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ---- Variáveis de Cor ---- */
:root {
    --bt-green:      #2ecc71;
    --bt-green-dark: #27ae60;
    --bt-ocean:      #1a6bbf;
    --bt-ocean-dark: #145299;
    --bt-sand:       #f5e6c8;
    --bt-sand-dark:  #e8d5a3;
    --bt-dark:       #1a1d2e;
    --bt-dark-2:     #252840;
    --bt-gray:       #6c757d;
    --bt-white:      #ffffff;
    --bt-radius:     14px;
    --bt-shadow:     0 4px 24px rgba(0,0,0,0.12);
    --bt-shadow-lg:  0 8px 40px rgba(0,0,0,0.18);
}

/* ---- Body & Tipografia ---- */
body {
    font-family: 'Outfit', 'Muli', 'Helvetica Neue', sans-serif !important;
    background: #f4f6fb;
    color: #1a1d2e;
}

/* ---- Sidebar ---- */
.sidebar {
    background: linear-gradient(180deg, var(--bt-dark) 0%, var(--bt-dark-2) 100%) !important;
    border-right: none !important;
    box-shadow: 4px 0 24px rgba(0,0,0,0.15) !important;
}

.sidebar .logo {
    background: rgba(255,255,255,0.04) !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
}

.bt-logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.5px;
    color: #fff !important;
}

.sidebar .nav .nav-item .nav-link {
    color: rgba(255,255,255,0.65) !important;
    font-weight: 500;
    letter-spacing: 0.2px;
    border-radius: 10px;
    margin: 2px 12px;
    transition: all 0.2s ease;
}

.sidebar .nav .nav-item .nav-link:hover,
.sidebar .nav .nav-item.active .nav-link {
    color: #fff !important;
    background: linear-gradient(90deg, var(--bt-ocean), var(--bt-green-dark)) !important;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.25) !important;
}

.sidebar .nav .nav-item .nav-link i {
    font-size: 1.15rem;
    margin-right: 10px;
    opacity: 0.9;
}

.bt-avatar-placeholder {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bt-ocean), var(--bt-green));
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bt-sidebar-divider {
    border-top: 1px solid rgba(255,255,255,0.08);
    margin: 8px 16px !important;
    padding: 0 !important;
}

.bt-sidebar-club-plan {
    padding: 12px 20px;
    margin-top: auto;
}

/* ---- Main Panel ---- */
.main-panel {
    background: #f4f6fb !important;
}

/* ---- Topbar ---- */
.bt-topbar {
    background: rgba(26, 29, 46, 0.97) !important;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 16px rgba(0,0,0,0.12);
}

.bt-topbar .navbar-brand {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 700;
    font-size: 1rem;
}

/* ---- Cards ---- */
.card {
    border: none !important;
    border-radius: var(--bt-radius) !important;
    box-shadow: var(--bt-shadow) !important;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--bt-shadow-lg) !important;
}

.card .card-header {
    border-radius: var(--bt-radius) var(--bt-radius) 0 0 !important;
    font-weight: 700;
    font-size: 0.95rem;
    background: transparent;
    border-bottom: 1px solid rgba(0,0,0,0.06) !important;
    padding: 18px 24px !important;
}

.card .card-body {
    padding: 24px !important;
}

/* ---- Stat Cards (Dashboard) ---- */
.bt-stat-card {
    border-radius: var(--bt-radius) !important;
    padding: 24px !important;
    color: #fff !important;
    min-height: 110px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.bt-stat-card::after {
    content: '';
    position: absolute;
    right: -20px; top: -20px;
    width: 100px; height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
}

.bt-stat-card.green  { background: linear-gradient(135deg, var(--bt-green-dark), var(--bt-green)); }
.bt-stat-card.ocean  { background: linear-gradient(135deg, var(--bt-ocean-dark), var(--bt-ocean)); }
.bt-stat-card.sand   { background: linear-gradient(135deg, #e67e22, #f39c12); }
.bt-stat-card.purple { background: linear-gradient(135deg, #8e44ad, #9b59b6); }

.bt-stat-card .stat-icon { font-size: 2.4rem; opacity: 0.9; }
.bt-stat-card .stat-value { font-size: 2rem; font-weight: 800; line-height: 1; }
.bt-stat-card .stat-label { font-size: 0.8rem; font-weight: 500; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.5px; }

/* ---- Buttons ---- */
.btn-bt-primary {
    background: linear-gradient(135deg, var(--bt-ocean), var(--bt-green-dark));
    color: #fff !important;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    padding: 10px 28px;
    transition: all 0.25s;
    box-shadow: 0 4px 14px rgba(46, 204, 113, 0.3);
}
.btn-bt-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
    color: #fff !important;
}

.btn-bt-outline {
    background: transparent;
    color: var(--bt-ocean) !important;
    border: 2px solid var(--bt-ocean);
    border-radius: 30px;
    font-weight: 600;
    padding: 9px 26px;
    transition: all 0.25s;
}
.btn-bt-outline:hover {
    background: var(--bt-ocean);
    color: #fff !important;
}

/* ---- Auth Pages ---- */
.bt-auth-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bt-dark) 0%, var(--bt-dark-2) 40%, var(--bt-ocean-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.bt-auth-card {
    background: rgba(255,255,255,0.97);
    border-radius: 24px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3) !important;
    width: 100%;
    max-width: 460px;
    padding: 40px !important;
}

.bt-auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.bt-auth-logo h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--bt-dark);
    margin: 0;
}

.bt-auth-logo .bt-emoji { font-size: 2.5rem; display: block; margin-bottom: 8px; }
.bt-auth-logo p { color: var(--bt-gray); font-size: 0.9rem; margin-top: 6px; }

/* ---- Tables ---- */
.table thead th {
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--bt-gray);
    border-top: none !important;
    padding: 14px 16px !important;
}

.table tbody td {
    vertical-align: middle !important;
    padding: 14px 16px !important;
}

/* ---- Badges ---- */
.badge { font-weight: 600; padding: 5px 10px; }

/* ---- Calendar / Agenda ---- */
.bt-calendar-slot {
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    margin: 2px 0;
}

.bt-slot-free     { background: rgba(46,204,113,0.12); color: var(--bt-green-dark); border: 1px solid rgba(46,204,113,0.3); }
.bt-slot-occupied { background: rgba(255,59,59,0.1);  color: #e74c3c;              border: 1px solid rgba(255,59,59,0.25); cursor: not-allowed; }
.bt-slot-free:hover { background: var(--bt-green); color: #fff; border-color: var(--bt-green); }

/* ---- Bracket ---- */
.bt-bracket { overflow-x: auto; padding: 20px 0; }
.bt-match-card {
    border-radius: 10px;
    border: 2px solid #eee;
    padding: 10px 14px;
    margin: 8px 0;
    min-width: 200px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: all 0.2s;
}
.bt-match-card.winner-declared { border-color: var(--bt-green); }
.bt-match-player   { font-weight: 600; font-size: 0.9rem; padding: 4px 0; }
.bt-match-score    { font-size: 0.85rem; color: var(--bt-gray); }
.bt-match-winner   { color: var(--bt-green-dark) !important; }

/* ---- Rank Table ---- */
.bt-rank-position {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
}
.bt-rank-1  { background: linear-gradient(135deg, #f6d365, #fda085); color: #fff; }
.bt-rank-2  { background: linear-gradient(135deg, #b0b3c6, #9095a7); color: #fff; }
.bt-rank-3  { background: linear-gradient(135deg, #cd7f32, #a0622a); color: #fff; }
.bt-rank-n  { background: #f0f2f5; color: var(--bt-gray); }

/* ---- Page Header ---- */
.bt-page-header {
    margin-bottom: 28px;
}
.bt-page-header h2 {
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--bt-dark);
    margin: 0;
}
.bt-page-header p {
    color: var(--bt-gray);
    margin: 4px 0 0 0;
    font-size: 0.9rem;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .bt-stat-card { flex-direction: column; text-align: center; }
    .bt-auth-card { padding: 28px 20px !important; }
    .bt-page-header h2 { font-size: 1.3rem; }
}
