/* Gestionale Appuntamenti Frontend Styles */

.gestionale-app-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    min-height: 600px;
}

.gestionale-login-required,
.gestionale-access-denied {
    background: #fff3cd;
    color: #856404;
    padding: 20px;
    border: 1px solid #ffeeba;
    border-radius: 4px;
    text-align: center;
    font-size: 16px;
}

.gestionale-access-denied {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* Calendar Styles */
.gestionale-calendar {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gestionale-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.gestionale-calendar-header h2 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.gestionale-calendar-nav {
    display: flex;
    gap: 10px;
}

.gestionale-calendar-nav button {
    background: #0073aa;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.gestionale-calendar-nav button:hover {
    background: #005a87;
}

.gestionale-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.gestionale-calendar-day {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    min-height: 100px;
    cursor: pointer;
    transition: all 0.3s;
}

.gestionale-calendar-day:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.2);
}

.gestionale-calendar-day.other-month {
    background: #f9f9f9;
    color: #999;
}

.gestionale-calendar-day.today {
    background: #e3f2fd;
    border-color: #0073aa;
    font-weight: bold;
}

.gestionale-calendar-day-number {
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.gestionale-calendar-day-appointments {
    font-size: 12px;
}

.gestionale-appointment-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: bold;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gestionale-appointment-badge.scheduled {
    background: #0073aa;
}

.gestionale-appointment-badge.completed {
    background: #28a745;
}

.gestionale-appointment-badge.cancelled {
    background: #dc3545;
}

.gestionale-appointment-badge.rescheduled {
    background: #ffc107;
    color: #333;
}

.gestionale-appointment-badge.no_show {
    background: #6c757d;
}

/* Clients List Styles */
.gestionale-clients-list {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gestionale-clients-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.gestionale-clients-header h2 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.gestionale-clients-actions {
    display: flex;
    gap: 10px;
}

.gestionale-clients-actions button {
    background: #0073aa;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.gestionale-clients-actions button:hover {
    background: #005a87;
}

.gestionale-search-box {
    margin-bottom: 20px;
}

.gestionale-search-box input {
    width: 100%;
    max-width: 400px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.gestionale-clients-table {
    width: 100%;
    border-collapse: collapse;
}

.gestionale-clients-table th {
    background: #f5f5f5;
    padding: 12px;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid #ddd;
}

.gestionale-clients-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

.gestionale-clients-table tr:hover {
    background: #f9f9f9;
}

.gestionale-clients-table .actions {
    display: flex;
    gap: 10px;
}

.gestionale-clients-table .actions button {
    background: #0073aa;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s;
}

.gestionale-clients-table .actions button:hover {
    background: #005a87;
}

.gestionale-clients-table .actions button.delete {
    background: #dc3545;
}

.gestionale-clients-table .actions button.delete:hover {
    background: #c82333;
}

/* Modal Styles */
.gestionale-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.gestionale-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gestionale-modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.gestionale-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.gestionale-modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.gestionale-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.gestionale-modal-close:hover {
    color: #333;
}

.gestionale-modal-body {
    margin-bottom: 20px;
}

.gestionale-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.gestionale-modal-footer button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.gestionale-modal-footer button.primary {
    background: #0073aa;
    color: white;
}

.gestionale-modal-footer button.primary:hover {
    background: #005a87;
}

.gestionale-modal-footer button.secondary {
    background: #6c757d;
    color: white;
}

.gestionale-modal-footer button.secondary:hover {
    background: #5a6268;
}

/* Form Styles */
.gestionale-form-group {
    margin-bottom: 20px;
}

.gestionale-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.gestionale-form-group input,
.gestionale-form-group select,
.gestionale-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.gestionale-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.gestionale-form-group input:focus,
.gestionale-form-group select:focus,
.gestionale-form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .gestionale-calendar-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 5px;
    }

    .gestionale-calendar-day {
        min-height: 80px;
        padding: 5px;
    }

    .gestionale-calendar-day-number {
        font-size: 12px;
    }

    .gestionale-appointment-badge {
        font-size: 10px;
        padding: 1px 4px;
    }

    .gestionale-clients-table {
        font-size: 12px;
    }

    .gestionale-clients-table th,
    .gestionale-clients-table td {
        padding: 8px;
    }

    .gestionale-modal-content {
        width: 95%;
        padding: 20px;
    }
}
