/* ==========================================================================
   Gestionale Accrediti Serie B - Custom CSS
   Main Color: #08793E | Secondary Color: #0D8AEE
   ========================================================================== */

:root {
    --color-main: #08793E;
    --color-main-dark: #065a2d;
    --color-main-light: #e8f5e9;
    --color-secondary: #0D8AEE;
    --color-secondary-light: #e3f2fd;
    --sidebar-width: 260px;
}

/* Layout */
#wrapper {
    min-height: 100vh;
}

#page-content-wrapper {
    min-width: calc(100vw - var(--sidebar-width));
}

/* Sidebar */
.sidebar {
    transition: margin-left 0.3s ease;
}

.sidebar .nav-link {
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    margin-bottom: 2px;
    transition: background-color 0.2s;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.25) !important;
    font-weight: 600;
}

/* Buttons - Main Color */
.btn-main {
    background-color: var(--color-main);
    border-color: var(--color-main);
    color: #fff;
}
.btn-main:hover, .btn-main:focus {
    background-color: var(--color-main-dark);
    border-color: var(--color-main-dark);
    color: #fff;
}

.btn-outline-main {
    color: var(--color-main);
    border-color: var(--color-main);
}
.btn-outline-main:hover {
    background-color: var(--color-main);
    color: #fff;
}

/* Buttons - Secondary Color */
.btn-secondary-custom {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
    color: #fff;
}

/* Badge */
.badge-main {
    background-color: var(--color-main);
    color: #fff;
}

.badge-secondary-custom {
    background-color: var(--color-secondary);
    color: #fff;
}

/* Tables */
.table thead th {
    background-color: var(--color-main);
    color: #fff;
    border: none;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Cards */
.card-main {
    border-left: 4px solid var(--color-main);
}

.card-secondary {
    border-left: 4px solid var(--color-secondary);
}

/* Match Card (Sponsor view) */
.match-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e0e0e0;
}

.match-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.match-card .team-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.match-card .match-vs {
    color: var(--color-main);
    font-weight: 700;
}

.match-card .deadline-warning {
    color: #dc3545;
    font-weight: 600;
}

/* Forms */
.form-control:focus, .form-select:focus {
    border-color: var(--color-main);
    box-shadow: 0 0 0 0.2rem rgba(8, 121, 62, 0.25);
}

/* Timeline */
.timeline-nav {
    display: flex;
    overflow-x: auto;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.timeline-nav .btn {
    white-space: nowrap;
    min-width: 80px;
}

/* Mobile */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        z-index: 1050;
        height: 100vh;
        transition: left 0.3s ease;
    }

    .sidebar.show {
        left: 0;
    }

    #page-content-wrapper {
        min-width: 100vw;
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1040;
        display: none;
    }

    .sidebar-overlay.show {
        display: block;
    }
}

/* Utility */
.text-main { color: var(--color-main) !important; }
.text-secondary-custom { color: var(--color-secondary) !important; }
.bg-main { background-color: var(--color-main) !important; }
.bg-main-light { background-color: var(--color-main-light) !important; }
.bg-secondary-light { background-color: var(--color-secondary-light) !important; }

/* Scroll custom */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }
