/* ---------- TennisPadel shared theme (same look & feel as the sidebar navigation) ---------- */
:root {
    --tp-glass-top: rgba(13, 48, 31, 0.94);
    --tp-glass-bottom: rgba(24, 78, 47, 0.90);
    --tp-accent: #d9ef4a;
    --tp-text: #eef6ef;
    --tp-text-muted: rgba(238, 246, 239, 0.82);
    --tp-line: rgba(255, 255, 255, 0.08);
    --tp-tile: rgba(255, 255, 255, 0.06);
    --tp-tile-hover: rgba(255, 255, 255, 0.09);
    --tp-selected: rgba(217, 239, 74, 0.16);
}

/* Page container */
.tp-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 1200px;
    margin: 0 auto;
    color: var(--tp-text);
}

/* Dark green glass panel */
.tp-glass {
    background: linear-gradient(180deg, var(--tp-glass-top) 0%, var(--tp-glass-bottom) 100%);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid var(--tp-line);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(8, 30, 18, 0.22);
    color: var(--tp-text);
}

/* Light surface for data widgets (grids, charts, filters) inside a glass panel */
.tp-surface {
    background: rgba(255, 255, 255, 0.96);
    color: #0f1724;
    border-radius: 14px;
    padding: 1rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    min-width: 0;
}

/* Headings */
.tp-h2 {
    position: relative;
    color: #fff;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    padding-left: 0.9rem;
    margin-bottom: 1rem;
}

    .tp-h2::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0.2em;
        bottom: 0.2em;
        width: 4px;
        border-radius: 4px;
        background: var(--tp-accent);
    }

.tp-h3 {
    color: #fff;
    font-size: 1.08rem;
    font-weight: 600;
    margin: 0.25rem 0 0.6rem;
}

/* Buttons */
.tp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    height: 2.75rem;
    padding: 0 1.1rem;
    border-radius: 12px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 150ms ease, color 150ms ease, transform 120ms ease;
}

    .tp-btn:hover {
        transform: translateY(-1px);
    }

    .tp-btn:disabled {
        opacity: 0.45;
        cursor: default;
        transform: none;
    }

    .tp-btn:focus-visible,
    .tp-chip:focus-visible {
        outline: 2px solid var(--tp-accent);
        outline-offset: 2px;
    }

.tp-btn-primary {
    background: var(--tp-accent);
    color: #0d301f;
}

    .tp-btn-primary:hover {
        background: #e6f77a;
        color: #0d301f;
    }

.tp-btn-ghost {
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.14);
}

    .tp-btn-ghost:hover:not(:disabled) {
        background: rgba(255, 255, 255, 0.16);
        color: #fff;
    }

.tp-btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
}

/* Chips - used for section navigation and tab strips (mirrors sidebar nav links) */
.tp-chip {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    height: 2.5rem;
    padding: 0 0.9rem;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--tp-text-muted);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 150ms ease, color 150ms ease;
}

    .tp-chip:hover {
        background: var(--tp-tile-hover);
        color: #fff;
    }

    .tp-chip.active {
        background: var(--tp-selected);
        color: #fff;
        font-weight: 600;
    }

        .tp-chip.active::after {
            content: "";
            position: absolute;
            left: 0.9rem;
            right: 0.9rem;
            bottom: 0;
            height: 3px;
            border-radius: 3px 3px 0 0;
            background: var(--tp-accent);
        }

        .tp-chip.active .oi {
            color: var(--tp-accent);
        }

    .tp-chip .oi {
        font-size: 0.95rem;
    }

/* Tab strip */
.tp-tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0.35rem;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.16);
    border: 1px solid var(--tp-line);
    overflow-x: auto;
    scrollbar-width: none;
}

    .tp-tabs::-webkit-scrollbar {
        display: none;
    }

    .tp-tabs .tp-chip {
        flex: 1 0 auto;
    }

/* Bullet list with lime dots */
.tp-list {
    list-style: none;
    margin: 0 0 0.75rem;
    padding: 0;
}

    .tp-list li {
        position: relative;
        padding-left: 1.2rem;
        margin-bottom: 0.35rem;
        color: var(--tp-text-muted);
        line-height: 1.5;
    }

        .tp-list li::before {
            content: "";
            position: absolute;
            left: 0.15rem;
            top: 0.55em;
            width: 0.5rem;
            height: 0.5rem;
            border-radius: 50%;
            background: var(--tp-accent);
            box-shadow: 0 0 0 3px rgba(217, 239, 74, 0.18);
        }

/* Small pill label */
.tp-tag {
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Muted helper text on glass */
.tp-muted {
    color: var(--tp-text-muted);
}

/* Simple spinner */
.tp-spinner {
    width: 2.25rem;
    height: 2.25rem;
    margin: 1.5rem auto;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--tp-accent);
    animation: tp-spin 0.8s linear infinite;
}

@keyframes tp-spin {
    to { transform: rotate(360deg); }
}

/* Error message on glass */
.tp-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-top: 0.75rem;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    background: rgba(220, 38, 38, 0.18);
    border: 1px solid rgba(248, 113, 113, 0.55);
    color: #fee2e2;
    font-size: 0.92rem;
    line-height: 1.45;
}

    .tp-alert .oi {
        margin-top: 0.15rem;
        color: #fca5a5;
    }

/* Section intro text */
.tp-section-intro {
    margin: -0.4rem 0 1rem;
    color: var(--tp-text-muted);
    font-size: 0.92rem;
}

/* Small inline spinner for buttons */
.tp-spinner-inline {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 2px solid rgba(13, 48, 31, 0.25);
    border-top-color: #0d301f;
    animation: tp-spin 0.8s linear infinite;
}

/* ---------- Page header (Statistics, Shared matches) ---------- */
.tp-page-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    align-items: center;
    gap: 1rem 1.5rem;
    padding: 1.6rem 2rem;
}

.tp-page-hero-text {
    min-width: 0;
}

.tp-page-title {
    color: #fff;
    font-size: clamp(1.5rem, 2.8vw, 2.1rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.tp-page-intro {
    max-width: 65ch;
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--tp-text-muted);
}

.tp-page-hero-img {
    width: 100%;
    height: auto;
    border-radius: 14px;
    border: 1px solid var(--tp-line);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

/* Text input on glass */
.tp-input {
    flex: 1 1 220px;
    min-width: 0;
    max-width: 360px;
    height: 2.75rem;
    padding: 0 0.9rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    font: inherit;
    letter-spacing: 0.04em;
}

    .tp-input::placeholder {
        color: rgba(238, 246, 239, 0.55);
        letter-spacing: normal;
    }

    .tp-input:focus {
        outline: 2px solid var(--tp-accent);
        outline-offset: 1px;
        border-color: transparent;
    }

.tp-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

/* ---------- Selected match details (Statistics, Shared matches) ---------- */
.tp-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--tp-line);
    scroll-margin-top: 5rem;
}

.tp-details-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
}

    .tp-details-head .tp-h3 {
        margin: 0;
    }

.tp-details-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tp-details-name {
    display: block;
    margin-top: 0.2rem;
    color: var(--tp-text-muted);
    font-size: 0.88rem;
    font-weight: 400;
}

.tp-details-body {
    overflow-x: auto;
}

.tp-details-empty {
    margin: 0;
    color: #4b5563;
}

.tp-spinner-dark {
    border-color: rgba(13, 48, 31, 0.15);
    border-top-color: #2e8b57;
}

@media (max-width: 800px) {
    .tp-page-hero {
        grid-template-columns: minmax(0, 1fr);
        padding: 1.25rem;
    }

    .tp-input {
        max-width: none;
    }

    .tp-page-hero-img {
        display: none;
    }
}

/* ---------- Dark panel for data widgets (charts, grids, filters) ---------- */
.tp-surface-dark {
    background: var(--tp-tile);
    border: 1px solid var(--tp-line);
    border-radius: 14px;
    padding: 1rem;
    min-width: 0;
    color: var(--tp-text);
}

    .tp-surface-dark .tp-details-empty {
        color: var(--tp-text-muted);
    }

/* Syncfusion components (fluent.css) restyled for the dark green panels.
   Popups (dropdown lists, calendars) are rendered outside the panel and keep the light theme. */

/* Grid */
.tp-sf-dark .e-grid,
.tp-sf-dark .e-grid .e-gridheader,
.tp-sf-dark .e-grid .e-gridcontent,
.tp-sf-dark .e-grid .e-content,
.tp-sf-dark .e-grid .e-table,
.tp-sf-dark .e-grid .e-headercell,
.tp-sf-dark .e-grid .e-detailheadercell,
.tp-sf-dark .e-grid .e-rowcell,
.tp-sf-dark .e-grid .e-emptyrow td,
.tp-sf-dark .e-grid .e-altrow .e-rowcell {
    background-color: transparent !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: var(--tp-text) !important;
}

.tp-sf-dark .e-grid {
    border-radius: 10px;
    overflow: hidden;
}

    .tp-sf-dark .e-grid .e-gridheader {
        background-color: rgba(0, 0, 0, 0.22) !important;
    }

    .tp-sf-dark .e-grid .e-headercell .e-headertext,
    .tp-sf-dark .e-grid .e-headercelldiv {
        color: var(--tp-accent) !important;
        font-weight: 600;
    }

    .tp-sf-dark .e-grid .e-altrow .e-rowcell {
        background-color: rgba(255, 255, 255, 0.03) !important;
    }

    .tp-sf-dark .e-grid .e-row:hover .e-rowcell {
        background-color: rgba(255, 255, 255, 0.08) !important;
        color: #fff !important;
    }

    .tp-sf-dark .e-grid .e-rowcell.e-active,
    .tp-sf-dark .e-grid .e-rowcell.e-selectionbackground {
        background-color: var(--tp-selected) !important;
        color: #fff !important;
    }

    .tp-sf-dark .e-grid .e-sortfilterdiv,
    .tp-sf-dark .e-grid .e-icons {
        color: var(--tp-text-muted) !important;
    }

/* Inputs: dropdown list, multiselect, date range picker */
.tp-sf-dark .e-input-group,
.tp-sf-dark .e-input-group.e-control-wrapper,
.tp-sf-dark .e-float-input.e-control-wrapper,
.tp-sf-dark .e-multiselect.e-input-group {
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 10px !important;
    color: #fff !important;
}

    .tp-sf-dark .e-input-group::before,
    .tp-sf-dark .e-input-group::after,
    .tp-sf-dark .e-input-group.e-control-wrapper::before,
    .tp-sf-dark .e-input-group.e-control-wrapper::after {
        display: none !important;
    }

    .tp-sf-dark .e-input-group.e-input-focus,
    .tp-sf-dark .e-input-group.e-control-wrapper.e-input-focus,
    .tp-sf-dark .e-multiselect.e-input-group.e-input-focus {
        border-color: var(--tp-accent) !important;
        box-shadow: 0 0 0 1px var(--tp-accent) !important;
    }

.tp-sf-dark .e-input-group input.e-input,
.tp-sf-dark .e-input-group.e-control-wrapper input.e-input,
.tp-sf-dark .e-multi-select-wrapper input,
.tp-sf-dark .e-ddl .e-input,
.tp-sf-dark .e-multi-select-wrapper .e-delim-view {
    background: transparent !important;
    color: #fff !important;
}

    .tp-sf-dark .e-input-group input.e-input::placeholder,
    .tp-sf-dark .e-multi-select-wrapper input::placeholder {
        color: rgba(238, 246, 239, 0.55) !important;
    }

.tp-sf-dark .e-input-group .e-input-group-icon,
.tp-sf-dark .e-input-group.e-control-wrapper .e-input-group-icon,
.tp-sf-dark .e-multi-select-wrapper .e-clear-icon,
.tp-sf-dark .e-multi-select-wrapper .e-ddl-icon {
    background: transparent !important;
    color: var(--tp-text-muted) !important;
}

    .tp-sf-dark .e-input-group .e-input-group-icon:hover,
    .tp-sf-dark .e-multi-select-wrapper .e-clear-icon:hover {
        color: var(--tp-accent) !important;
    }

.tp-sf-dark .e-multi-select-wrapper .e-chips-collection .e-chips {
    background: var(--tp-selected) !important;
    border: 1px solid rgba(217, 239, 74, 0.45) !important;
}

    .tp-sf-dark .e-multi-select-wrapper .e-chips-collection .e-chips .e-chipcontent {
        color: #fff !important;
    }

    .tp-sf-dark .e-multi-select-wrapper .e-chips-collection .e-chips .e-chips-close::before {
        color: var(--tp-accent) !important;
    }

/* Icons and spinner */
.tp-sf-dark .e-icons,
.tp-sf-dark .e-svg-icon {
    color: var(--tp-accent);
    fill: var(--tp-accent);
}

.tp-sf-dark .e-spinner-pane .e-spinner-inner .e-spin-fluent .e-path-arc,
.tp-sf-dark .e-spinner-pane .e-spinner-inner svg .e-path-arc {
    stroke: var(--tp-accent) !important;
}

@media (prefers-reduced-motion: reduce) {
    .tp-btn, .tp-chip {
        transition: none;
    }

    .tp-spinner {
        animation-duration: 2s;
    }
}
