/* Tennis Club Management - Custom Styles */

:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
}

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Dashboard Cards */
.dashboard-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.dashboard-card .card-body {
    padding: 1.5rem;
}

.dashboard-card .display-4 {
    font-size: 2.5rem;
    font-weight: bold;
}

.stat-icon {
    font-size: 3rem;
    opacity: 0.3;
}

/* Event Widget */
.event-widget {
    max-height: 400px;
    overflow-y: auto;
}

.event-item {
    border-left: 4px solid var(--primary-color);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    background: white;
    border-radius: 4px;
    transition: background 0.2s;
}

.event-item:hover {
    background: #f8f9fa;
}

.event-date {
    font-size: 0.875rem;
    color: #6c757d;
}

/* DataTables customization */
.dataTables_wrapper {
    padding: 1rem 0;
}

table.dataTable thead th {
    background-color: #f8f9fa;
    font-weight: 600;
}

table.dataTable tbody tr:hover {
    background-color: #f8f9fa;
}

/* Status badges */
.badge-status {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.status-attivo {
    background-color: var(--success-color);
}

.status-non_attivo {
    background-color: var(--danger-color);
}

.cert-valid {
    color: var(--success-color);
}

.cert-expiring {
    color: var(--warning-color);
}

.cert-expired {
    color: var(--danger-color);
}

/* Forms */
.form-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.form-section h3 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #dee2e6;
}

/* Action buttons */
.btn-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    margin: 0 0.125rem;
}

/* Login page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../img/bg_tennis.jpg') no-repeat center center fixed;
    background-size: cover;
}

.login-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    width: 100%;
    max-width: 400px;
}

.login-header {
    background: var(--primary-color);
    color: white;
    padding: 2rem;
    text-align: center;
}

.login-header i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.login-body {
    padding: 2rem;
}

/* File upload preview */
.file-preview {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.875rem;
}

/* Calendar customization */
.fc .fc-button-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.fc .fc-button-primary:hover {
    background-color: #0b5ed7;
    border-color: #0b5ed7;
}

/* ToDo list */
.todo-item {
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.2s;
}

.todo-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.todo-item.completed {
    opacity: 0.6;
    background: #f8f9fa;
}

.todo-item.completed .todo-title {
    text-decoration: line-through;
}

.todo-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

/* Financial summary */
.financial-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.financial-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid;
}

.financial-card.income {
    border-color: var(--success-color);
}

.financial-card.expense {
    border-color: var(--danger-color);
}

.financial-card.balance {
    border-color: var(--info-color);
}

.financial-amount {
    font-size: 1.75rem;
    font-weight: bold;
    margin-top: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dashboard-card .display-4 {
        font-size: 2rem;
    }

    .stat-icon {
        font-size: 2rem;
    }

    .financial-summary {
        grid-template-columns: 1fr;
    }

    .navbar-nav .nav-link {
        font-size: 1.2rem;
        padding: 0.75rem 1rem;
    }

    .dropdown-item {
        font-size: 1.1rem;
        padding: 0.75rem 1.5rem;
    }
}

/* Utilities */
.text-income {
    color: var(--success-color);
}

.text-expense {
    color: var(--danger-color);
}

.cursor-pointer {
    cursor: pointer;
}

.no-wrap {
    white-space: nowrap;
}