.cg-dashboard {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}

/* Welcome Box */
.cg-welcome {
    background: linear-gradient(to left, #E6E9F0, #EEF1F5);
    padding: 20px 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Two-column layout for actions */
.cg-action-row {
    display: flex;
    gap: 20px;
    margin: 25px 0;
}

.cg-action-row .cg-box {
    flex: 1;
}

/* Mobile stacking */
@media (max-width: 700px) {
    .cg-action-row {
        flex-direction: column;
    }
}

/* Unified Buttons */
.cg-btn-primary {
    display: inline-block;
    background: #0085CD;
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    margin-top: 8px;
}
.cg-btn-primary:hover {
    background: #006fad;
}

/* Small descriptive text */
.cg-subtext {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 8px;
}



#cg-map {
    height: 400px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.cg-map-icon {
    font-size: 26px;
    text-align: center;
    line-height: 32px;
}



.cg-checkin-btn {
    padding: 6px 12px;
    background: #0085CD;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
.cg-checkin-btn:hover {
    background: #006fa7;
}

/* User location (🟢) pulsing */
.cg-map-user {
    font-size: 10px;
    animation: cg-pulse 1.5s infinite ease-in-out;
}

@keyframes cg-pulse {
    0%   { transform: scale(1); opacity: 1; }
    50%  { transform: scale(1.3); opacity: 0.6; }
    100% { transform: scale(1); opacity: 1; }
}


#cg-progress-container {
    height: 24px;
    background: #eee;
    border-radius: 12px;
    margin-bottom: 30px;
    overflow: hidden;
}

#cg-progress-bar {
    height: 24px;
    background: #4caf50;
    width: 0%;
    border-radius: 12px;
    color: white;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    line-height: 24px;
}

.cg-box {
    margin: 25px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fafafa;
}

.cg-checkpoint {
    padding: 12px 10px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
}

.cg-checkpoint.done {
    background: #e6ffe6;
}

.cg-checkpoint em {
    font-style: normal;
    color: #fd5858;
}

.cg-icon-done {
    background: #28a745;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
}

.cg-icon-pending {
    background: #ff4646;
    color: white;
    border-radius: 50%;
}


.cg-login-box {
    max-width: 450px;
    margin: 50px auto;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.cg-login-box h2 {
    margin-bottom: 10px;
}

.cg-btn {
    display: block;
    margin: 10px 0;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

.cg-primary {
    background: #0085CD;
    color: white;
}

.cg-secondary {
    background: #f0f0f0;
    color: #333;
}

.cg-google {
    background: #DB4437;
    color: white;
}

.cg-apple {
    background: black;
    color: white;
}

.cg-divider {
    margin: 15px 0;
    font-size: 0.9rem;
    opacity: 0.6;
}


.cg-login-wrapper {
    max-width: 420px;
    margin: 60px auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    text-align: center;
}

.cg-auth-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.cg-auth-tabs button {
    padding: 10px 20px;
    border: 1px solid #ccc;
    background: #f6f6f6;
    cursor: pointer;
    border-radius: 6px;
}

.cg-auth-tabs button.active {
    background: #0085CD;
    color: white;
    border-color: #0070b3;
}

.cg-auth-tab-content {
    display: none;
}
.cg-auth-tab-content.active {
    display: block;
}

.cg-register-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cg-register-form input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.cg-register-form button {
    background: #0085CD;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* Leaderboard */
.cg-leaderboard {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    font-family: system-ui, sans-serif;
}

.cg-leaderboard h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 26px;
    color: #222;
}

.cg-leaderboard table {
    width: 100%;
    border-collapse: collapse;
}

.cg-leaderboard th {
    text-align: left;
    padding: 12px 10px;
    background: #f2f4f7;
    font-size: 14px;
    text-transform: uppercase;
    color: #333;
}

.cg-leaderboard td {
    padding: 12px 10px;
    border-bottom: 1px solid #f3f3f3;
    font-size: 15px;
    color: #444;
}

.cg-leaderboard tr:nth-child(1) td {
    font-weight: bold;
    color: #0a7d2b;
}

.cg-leaderboard tr:hover {
    background: #fafafa;
}

/* FORCE override Blocksy table styling (desktop & base) */
.cg-leaderboard table,
.cg-leaderboard th,
.cg-leaderboard td {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.cg-leaderboard td {
    border-bottom: 1px solid #f3f3f3 !important;
}

.cg-leaderboard th {
    border-bottom: 2px solid #e5e5e5 !important;
    background: #f9f9f9 !important;
}

.cg-leaderboard th,
.cg-leaderboard td {
    padding: 12px 10px !important;
}

/* -------------------------------------- */
/* MOBILE LEADERBOARD (max-width: 600px) */
/* -------------------------------------- */
@media (max-width: 600px) {

    .cg-leaderboard table,
    .cg-leaderboard thead,
    .cg-leaderboard tbody,
    .cg-leaderboard th,
    .cg-leaderboard td,
    .cg-leaderboard tr {
        display: block;
        width: 100%;
    }

    /* Hide header row on mobile */
    .cg-leaderboard thead {
        display: none;
    }

    /* Each row becomes a card */
    .cg-leaderboard tr {
        margin-bottom: 14px;
        padding: 12px;
        border: 1px solid #eee !important;
        border-radius: 10px;
        background: #ffffff !important;
        box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    }

    /* Cells: no bottom border, own padding */
    .cg-leaderboard td {
        border-bottom: none !important;
        padding: 6px 0 !important;
    }

    /* Add labels back for each “column” */
    .cg-leaderboard td:nth-child(1)::before {
        content: "Rang: ";
        font-weight: 600;
    }
    .cg-leaderboard td:nth-child(2)::before {
        content: "Teilnehmer: ";
        font-weight: 600;
    }
    .cg-leaderboard td:nth-child(3)::before {
        content: "Checkpoints: ";
        font-weight: 600;
    }
    .cg-leaderboard td:nth-child(4)::before {
        content: "Tage: ";
        font-weight: 600;
    }
    .cg-leaderboard td:nth-child(5)::before {
        content: "KM: ";
        font-weight: 600;
    }

    .cg-leaderboard td::before {
        color: #555;
        margin-right: 6px;
    }

    /* Disable hover background on cards */
    .cg-leaderboard tr:hover {
        background: #ffffff !important;
    }
}


.cg-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin: 10px 0;
}

.cg-controls input,
.cg-controls button {
    height: 40px; /* force same height */
    display: flex;
    align-items: center;
}

/* Search input */
#cg-search {
    padding: 0 12px;         /* horizontal padding only */
    width: 200px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* Find Me button */
.cg-find-me-btn {
    padding: 0 12px;         /* match input height */
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background: #f7f7f7;
    cursor: pointer;
    transition: 0.2s;
    line-height: 1;          /* prevents “too tall” button */
}

.cg-find-me-btn:hover {
    background: #eaeaea;
}




.flag {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    vertical-align: middle;
    margin-right: 6px;
}


/* FORCE identical height & baseline for search + find-me button */
.cg-controls input,
.cg-controls button.cg-find-me-btn {
    margin: 0px ;
    height: 40px !important;
    padding: 0 14px !important;
    line-height: 40px !important; /* FIXES baseline */
    box-sizing: border-box !important;
}
