:root {
  --primary: #0d6efd;
  --secondary: #6c757d;
  --success: #198754;
  --danger: #dc3545;
  --warning: #ffc107;
  --info: #0dcaf0;
  --light: #f8f9fa;
  --dark: #212529;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f8f9fa;
}

/* Sidebar */
.sidebar {
  width: 280px;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  overflow-y: auto;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 12px;
}

.sidebar-logo-frame,
.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ffffff, #dbeafe);
  color: var(--primary);
  border: 2px solid rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

.sidebar-logo-image,
.profile-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-logo-fallback,
.profile-avatar-fallback {
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
}

.sidebar .nav-link {
  color: rgba(255, 255, 255, 0.7) !important;
  padding: 12px 15px;
  margin-bottom: 5px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white !important;
}

.sidebar .nav-link.active {
  background-color: var(--primary);
  color: white !important;
}

main {
  margin-left: 280px;
  background-color: #f8f9fa;
}

/* Cards */
.card {
  transition: all 0.3s ease;
}

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

/* Buttons */
.btn {
  font-weight: 500;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: #0b5ed7;
  border-color: #0b5ed7;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

/* Tabelas */
.table {
  border-collapse: collapse;
}

.table thead th {
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
  background-color: #f8f9fa;
}

.table tbody tr {
  border-bottom: 1px solid #dee2e6;
}

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

/* Status Badges */
.badge-status {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 5px;
  font-weight: 500;
  font-size: 0.85rem;
}

.badge-andamento {
  background-color: #fff3cd;
  color: #856404;
}

.badge-aguardando {
  background-color: #cfe2ff;
  color: #084298;
}

.badge-finalizado {
  background-color: #d1e7dd;
  color: #0f5132;
}

/* Modais */
.modal-content {
  border-radius: 10px;
  overflow: hidden;
}

.modal-content.shadow-sm {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18);
}

.modal-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.modal-header.bg-danger.text-white.border-0 {
  border-bottom: none;
}

.modal-body.p-4 {
  padding: 1.5rem !important;
}

.modal-footer {
  background-color: #f8f9fa;
  border-top: 1px solid #dee2e6;
}

.modal-footer.bg-light.border-0 {
  border-top: none;
}

/* Formulários */
.form-control,
.form-select {
  border-radius: 5px;
  border: 1px solid #dee2e6;
  padding: 10px 12px;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Alertas */
.alert {
  border-radius: 5px;
  border: none;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
}

.alert-warning {
  background-color: #fff3cd;
  color: #856404;
}

/* Avatar de perfil */
.profile-avatar {
  width: 48px;
  height: 48px;
  border: 2px solid rgba(13, 110, 253, 0.2);
  background: linear-gradient(135deg, #e7f1ff, #f8fbff);
  color: var(--primary);
}

.perfil-upload-card {
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 1rem;
  background: #f8fafc;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }

  main {
    margin-left: 0;
  }

  .d-flex {
    flex-direction: column;
  }
}

/* Animações */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-in;
}

/* Loading Spinner */
.spinner-loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Utility Classes */
.min-vh-100 {
  min-height: 100vh;
}

.flex-grow-1 {
  flex-grow: 1;
}

.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Cards de Métrica */
.card-metric {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.card-metric h2 {
  font-size: 2rem;
  font-weight: bold;
}

.card-metric p {
  font-size: 0.95rem;
  opacity: 0.9;
}
