:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #0dcaf0;
  --light-color: #f8f9fa;
  --dark-color: #212529;
}

body {
  background-color: #f8f9fa;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.navbar-brand {
  font-size: 1.5rem;
}

.card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.card-header {
  background: linear-gradient(135deg, var(--primary-color), #0056b3);
  color: white;
  border-radius: 12px 12px 0 0 !important;
  border: none;
}

.btn {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), #0056b3);
  border: none;
}

.btn-success {
  background: linear-gradient(135deg, var(--success-color), #146c43);
  border: none;
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger-color), #b02a37);
  border: none;
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning-color), #e0a800);
  border: none;
  color: #000;
}

.table {
  border-radius: 8px;
  overflow: hidden;
}

.table thead th {
  background-color: var(--primary-color);
  color: white;
  border: none;
  font-weight: 600;
}

.table tbody tr:hover {
  background-color: rgba(13, 110, 253, 0.05);
}

.badge {
  font-size: 0.75em;
  padding: 0.5em 0.75em;
  border-radius: 6px;
}

.alert {
  border: none;
  border-radius: 8px;
  font-weight: 500;
}

.form-control,
.form-select {
  border-radius: 8px;
  border: 2px solid #e9ecef;
  transition: border-color 0.2s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.stats-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 15px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.stats-card .stats-number {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.stats-card .stats-label {
  font-size: 1rem;
  opacity: 0.9;
}

.login-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  background: white;
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  width: 100%;
}

.unit-selection {
  min-height: 100vh;
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.unit-card {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  margin: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.unit-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.unit-card .unit-header {
  background: linear-gradient(135deg, var(--primary-color), #0056b3);
  color: white;
  padding: 1.5rem;
  border-radius: 15px;
  margin-bottom: 1.5rem;
  text-align: center;
}

.agenda-grid {
  display: grid;
  grid-template-columns: 150px repeat(7, 1fr);
  gap: 1px;
  background-color: #dee2e6;
  border-radius: 8px;
  overflow: hidden;
}

.agenda-header,
.agenda-cell {
  background-color: white;
  padding: 0.5rem;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
}

.agenda-header {
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
}

.agenda-cell.occupied {
  background-color: #dc3545;
  color: white;
  cursor: pointer;
}

.agenda-cell.available {
  background-color: #198754;
  color: white;
  cursor: pointer;
}

.agenda-cell:hover {
  opacity: 0.8;
}

.space-color {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.5rem;
}

@media (max-width: 768px) {
  .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .card {
    margin-bottom: 1rem;
  }

  .table-responsive {
    font-size: 0.875rem;
  }

  .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }

  .stats-card .stats-number {
    font-size: 2rem;
  }

  .agenda-grid {
    grid-template-columns: 100px repeat(7, 1fr);
  }
}

/* Animações */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

/* Loading spinner */
.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #0056b3;
}
