/* File: css/styleapp.css */

body {
  background: linear-gradient(to bottom, #f8f9fa 0%, #e9ecef 100%);
  min-height: 100vh;
}

/* Dashboard Cards */
.dashboard-card {
  background: white;
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  position: relative;
  overflow: hidden;
  height: 100%;
}

.dashboard-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.dashboard-card-total::before { 
  background: linear-gradient(135deg, #1e293b 0%, #166534 100%); 
}

.dashboard-card-ok::before { 
  background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%); 
}

.dashboard-card-ko::before { 
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); 
}

.dashboard-card-tr::before { 
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); 
}

.dashboard-card-rif::before { 
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); 
}

.dashboard-card-fut::before { 
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
}

.dashboard-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.dashboard-card .card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #718096;
  margin-bottom: 0.5rem;
}

.dashboard-card .card-text b {
  font-size: 2.5rem;
  font-weight: 700;
  color: #2d3748;
}

/* Page Header - Storico */
.page-header {
  background: linear-gradient(135deg, #1e293b 0%, #166534 100%);
  color: white;
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}

.page-header p {
  margin: 0.5rem 0 0 0;
  opacity: 0.95;
}

/* Filter Buttons */
.filter-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: white;
  border-radius: 20px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  border: 2px solid #e2e8f0;
  background: white;
  color: #2d3748;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.filter-btn.active {
  background: linear-gradient(135deg, #1e293b 0%, #166534 100%);
  color: white;
  border-color: #166534;
}

.filter-btn .badge-count {
  background: rgba(0,0,0,0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
}

.filter-btn.active .badge-count {
  background: rgba(255,255,255,0.2);
}

/* Message Section */
.text-center h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2d3748;
}

.text-center h3 span {
  color: #166534;
  font-weight: 700;
}

/* Table Styling */
#appointmentsContainer {
  background: white;
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

table.dataTable {
  border-collapse: separate !important;
  border-spacing: 0;
}

table.dataTable thead th {
  background: #f8f9fa;
  color: #2d3748;
  font-weight: 600;
  border-bottom: 2px solid #e9ecef;
  padding: 1rem;
}

table.dataTable tbody td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
}

table.dataTable tbody tr:hover {
  background-color: #f8f9fa;
}

.btn-primary {
  background: linear-gradient(135deg, #1e293b 0%, #166534 100%);
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(22, 101, 52, 0.3);
}

.btn-secondary {
  background: #6c757d;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-weight: 500;
}

/* Calendar Controls */
#calendar-controls {
  background: white;
  padding: 1rem;
  border-radius: 15px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}

/* Calendar Styling */
#calendar {
  background: white;
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.fc {
  border: none !important;
}

.fc-button-primary {
  background: linear-gradient(135deg, #1e293b 0%, #166534 100%) !important;
  border: none !important;
}

.fc-button-primary:hover {
  background: linear-gradient(135deg, #166534 0%, #1e293b 100%) !important;
}

/* Modal Styling */
.modal-content {
  border-radius: 20px;
  border: none;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.modal-header {
  border-radius: 20px 20px 0 0;
  border-bottom: 1px solid #e9ecef;
}

.modal-header.bg-danger {
  background: linear-gradient(135deg, #2d3748 0%, #1e293b 100%) !important;
}

.modal-footer {
  border-top: 1px solid #e9ecef;
}

.btn-warning {
  background: linear-gradient(135deg, #166534 0%, #0f4c28 100%);
  border: none;
  color: white;
  font-weight: 600;
  border-radius: 8px;
}

.btn-warning:hover {
  background: linear-gradient(135deg, #0f4c28 0%, #166534 100%);
}

.btn-danger {
  background: #6c757d;
  border: none;
  border-radius: 8px;
}

.btn-danger:hover {
  background: #5a6268;
}

/* Form Controls */
.form-select, 
.form-control {
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  padding: 0.75rem;
  transition: all 0.3s ease;
}

.form-select:focus, 
.form-control:focus {
  border-color: #166534;
  box-shadow: 0 0 0 0.2rem rgba(22, 101, 52, 0.15);
}

.form-check-input:checked {
  background-color: #166534;
  border-color: #166534;
}

/* Skeleton */
.skeleton-block {
  text-align: center;
  padding: 3rem;
}

.skeleton-cat {
  max-width: 200px;
  opacity: 0.7;
}

/* Modal View Appuntamenti - Classi dedicate */
.modal-section-app {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.modal-section-app:last-of-type {
  margin-bottom: 0;
}

.modal-section-title-app {
  font-size: 0.95rem;
  font-weight: 700;
  color: #166534;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #166534;
}

.modal-info-row-app {
  display: flex;
  margin-bottom: 0.75rem;
  align-items: flex-start;
}

.modal-info-row-app:last-child {
  margin-bottom: 0;
}

.modal-info-label-app {
  font-weight: 600;
  color: #2d3748;
  min-width: 120px;
  flex-shrink: 0;
}

.modal-info-value-app {
  color: #4a5568;
  flex: 1;
  word-break: break-word;
}

.modal-info-value-app a {
  color: #166534;
  text-decoration: none;
  font-weight: 500;
}

.modal-info-value-app a:hover {
  text-decoration: underline;
}

.badge-confirmed-app {
  background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
  color: #1e293b;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-block;
}

/* Mobile responsive */
@media (max-width: 576px) {
  .modal-info-row-app {
    flex-direction: column;
  }
  
  .modal-info-label-app {
    min-width: auto;
    margin-bottom: 0.25rem;
  }

  .modal-section-app {
    padding: 1rem;
  }

  .modal-dialog {
    margin: 0.5rem;
  }
}