/* 
 * GCS Theme - Sistema de Gestão de Grupos e Supervisão
 * Versão 1.5 - 2025
 */

:root {
  /* Cores Principais */
  --primary: #2563eb;         /* Azul principal */
  --primary-dark: #1d4ed8;    /* Azul escuro */
  --primary-light: #60a5fa;   /* Azul claro */
  --secondary: #10b981;       /* Verde */
  --secondary-dark: #059669;  /* Verde escuro */
  --secondary-light: #34d399; /* Verde claro */
  --accent: #8b5cf6;          /* Roxo */
  --warning: #f59e0b;         /* Amarelo */
  --danger: #ef4444;          /* Vermelho */
  --info: #06b6d4;            /* Ciano */
  --success: #22c55e;         /* Verde */
  
  /* Tons de cinza */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Cores de texto */
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-light: var(--gray-400);
  --text-white: #000000;
  
  /* Espaçamento */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Bordas */
  --border-radius-sm: 0.25rem;
  --border-radius-md: 0.5rem;
  --border-radius-lg: 0.75rem;
  --border-radius-xl: 1rem;
  --border-radius-full: 9999px;
  
  /* Sombras */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Fontes */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: Georgia, Cambria, 'Times New Roman', Times, serif;
  --font-mono: Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  
  /* Tamanhos de fonte */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  
  /* Transições */
  --transition-fast: 150ms;
  --transition-normal: 300ms;
  --transition-slow: 500ms;
}

/* Estilos Globais */
body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--gray-100);
  line-height: 1.5;
  margin: 0;
  padding: 0;
}

/* Navbar */
.navbar {
  box-shadow: var(--shadow-md);
  padding: 0.75rem 0;
}

.navbar-brand img {
  height: 40px;
  width: auto;
  transition: transform var(--transition-normal);
}

.navbar-brand:hover img {
  transform: scale(1.05);
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-md);
  transition: all var(--transition-fast);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
  color: var(--text-white);
  background-color: rgba(255, 255, 255, 0.1);
}

.navbar-dark .navbar-nav .nav-link.active {
  color: var(--text-white);
  background-color: rgba(255, 255, 255, 0.15);
  font-weight: 600;
}

.dropdown-menu {
  border: none;
  box-shadow: var(--shadow-lg);
  border-radius: var(--border-radius-md);
  padding: 0.5rem;
}

.dropdown-item {
  border-radius: var(--border-radius-sm);
  padding: 0.5rem 1rem;
  font-weight: 500;
}

.dropdown-item:hover, 
.dropdown-item:focus {
  background-color: var(--gray-100);
}

.dropdown-item.active {
  background-color: var(--primary-light);
  color: var(--text-white);
}

/* Cards */
.card {
  border: none;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--text-white);
  font-weight: 600;
  border-bottom: none;
  padding: 1rem 1.25rem;
}

.card-header.bg-success {
  background: linear-gradient(135deg, var(--success), #0d9448);
}

.card-header.bg-info {
  background: linear-gradient(135deg, var(--info), #0891b2);
}

.card-header.bg-warning {
  background: linear-gradient(135deg, var(--warning), #d97706);
}

.card-header.bg-danger {
  background: linear-gradient(135deg, var(--danger), #dc2626);
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  background-color: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  padding: 1rem 1.25rem;
}

/* Botões */
.btn {
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  border-radius: var(--border-radius-md);
  transition: all var(--transition-fast);
}

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

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

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

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

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

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

.btn-sm {
  font-size: var(--text-sm);
  padding: 0.25rem 0.75rem;
}

.btn-lg {
  font-size: var(--text-lg);
  padding: 0.75rem 1.5rem;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon i {
  margin-right: 0.5rem;
}

.btn-icon-only {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-only.btn-sm {
  width: 2rem;
  height: 2rem;
}

.btn-floating {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 1030;
}

/* Tabelas */
.table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.table th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  padding: 0.75rem 1rem;
  background-color: var(--gray-100);
}

.table td {
  padding: 1rem;
  vertical-align: middle;
  border-top: 1px solid var(--gray-200);
}

.table-hover tbody tr:hover {
  background-color: var(--gray-50);
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.02);
}

/* Badges */
.badge {
  font-weight: 500;
  padding: 0.35em 0.65em;
  border-radius: var(--border-radius-full);
}

.badge-pill {
  padding-right: 0.6em;
  padding-left: 0.6em;
  border-radius: 10rem;
}

/* Formulários */
.form-control {
  border-radius: var(--border-radius-md);
  border: 1px solid var(--gray-300);
  padding: 0.5rem 0.75rem;
  font-size: var(--text-base);
}

.form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.form-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.form-text {
  color: var(--text-light);
  font-size: var(--text-sm);
  margin-top: 0.25rem;
}

.form-select {
  border-radius: var(--border-radius-md);
  border: 1px solid var(--gray-300);
  padding: 0.5rem 2.25rem 0.5rem 0.75rem;
  font-size: var(--text-base);
}

.form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* Alertas */
.alert {
  border: none;
  border-radius: var(--border-radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.alert-success {
  background-color: rgba(34, 197, 94, 0.1);
  color: #0d9448;
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.alert-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.alert-info {
  background-color: rgba(6, 182, 212, 0.1);
  color: #0891b2;
}

/* Modais */
.modal-content {
  border: none;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.modal-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--text-white);
  border-bottom: none;
  padding: 1.25rem;
}

.modal-title {
  font-weight: 600;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid var(--gray-200);
  padding: 1.25rem;
}

/* Biblioteca de Materiais */
.material-card {
  transition: all var(--transition-normal);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.material-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.material-cover {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.material-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.material-card:hover .material-cover-img {
  transform: scale(1.05);
}

.default-cover {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.default-cover.bg-success {
  background: linear-gradient(135deg, var(--success), #0d9448);
}

.default-cover.bg-info {
  background: linear-gradient(135deg, var(--info), #0891b2);
}

.material-type-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: rgba(0,0,0,0.6);
  color: #0d47a1;
  padding: 4px 10px;
  border-radius: var(--border-radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  backdrop-filter: blur(4px);
}

.material-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-normal);
  backdrop-filter: blur(2px);
}

.material-card:hover .material-overlay {
  opacity: 1;
}

.download-btn {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: var(--text-xl);
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform var(--transition-normal);
}

.material-card:hover .download-btn {
  transform: translateY(0);
}

.material-title {
  font-weight: 600;
  margin-top: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  color: #000000
}

/* Estatísticas e Cards de Dashboard */
.stats-card {
  background-color: white;
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.stats-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.stats-card .icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: rgba(37, 99, 235, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  font-size: var(--text-2xl);
  color: var(--primary);
}

.stats-card .icon.text-success {
  background-color: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

.stats-card .icon.text-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.stats-card .icon.text-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.stats-card .content h3 {
  font-size: var(--text-3xl);
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.stats-card .content p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* Animações */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.fade-in {
  animation: fadeIn var(--transition-normal) ease-in-out;
}

.slide-up {
  animation: slideUp var(--transition-normal) ease-in-out;
}

/* Responsividade */
@media (max-width: 768px) {
  .card-body {
    padding: 1.25rem;
  }
  
  .stats-card {
    padding: 1.25rem;
  }
  
  .stats-card .icon {
    width: 50px;
    height: 50px;
    font-size: var(--text-xl);
  }
  
  .stats-card .content h3 {
    font-size: var(--text-2xl);
  }
  
  .material-cover {
    height: 180px;
  }
}

@media (max-width: 576px) {
  .btn {
    padding: 0.375rem 1rem;
  }
  
  .card-header {
    padding: 0.75rem 1rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .table th, 
  .table td {
    padding: 0.75rem;
  }
  
  .material-cover {
    height: 160px;
  }
}

/* Sidebar Styles */
.sidebar {
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  z-index: 1030;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--primary-dark), var(--primary));
  transition: all 0.3s;
  box-shadow: var(--shadow-lg);
}

.sidebar-header {
  padding: 1.5rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
  max-width: 160px;
  height: auto;
}

.sidebar-nav {
  padding: 1rem 0;
}

.sidebar-nav .nav-link {
  color: rgba(255, 255, 255, 0.8);
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.sidebar-nav .nav-link:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: var(--secondary);
}

.sidebar-nav .nav-link.active {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: var(--secondary);
}

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.1);
}

.user-info {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--secondary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-right: 0.75rem;
}

.user-details {
  flex: 1;
}

.user-name {
  color: white;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
}

.sidebar-actions {
  display: flex;
  justify-content: space-between;
}

.sidebar-action {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  transition: all 0.2s;
}

.sidebar-action:hover {
  color: white;
}

/* Main Content Styles */
.content-wrapper {
  margin-left: 280px;
  padding: 1.5rem;
  min-height: 100vh;
  transition: all 0.3s;
  background-color: var(--gray-100);
}

.toggle-sidebar {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1040;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: all 0.3s;
  display: none;
}

.toggle-sidebar:hover {
  background-color: var(--primary-dark);
}

/* Collapsed Sidebar */
.sidebar-collapsed .sidebar {
  margin-left: -280px;
}

.sidebar-collapsed .content-wrapper {
  margin-left: 0;
}

.sidebar-collapsed .toggle-sidebar {
  left: 1rem;
}

/* Card Styles */
.card {
  border: none;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow);
  transition: all 0.3s;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  background-color: transparent;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1.25rem 1.5rem;
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  background-color: transparent;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1.25rem 1.5rem;
}

/* Stat Card */
.stat-card {
  display: flex;
  align-items: center;
  padding: 1.5rem;
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--border-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-right: 1rem;
}

.stat-info {
  flex: 1;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  line-height: 1;
}

.stat-label {
  color: var(--medium);
  font-size: 0.875rem;
}

/* Group Card */
.group-card {
  transition: all 0.3s;
}

.group-card:hover {
  transform: translateY(-5px);
}

.group-card .card-header {
  padding: 1rem 1.25rem;
}

.group-type {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--border-radius-full);
  background-color: rgba(255, 255, 255, 0.2);
}

.group-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.group-stat {
  text-align: center;
}

.group-stat-value {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.group-stat-label {
  font-size: 0.75rem;
  color: var(--medium);
}

/* Material Card */
.material-card {
  position: relative;
  overflow: hidden;
  height: 200px;
  border-radius: var(--border-radius-md);
  background-size: cover;
  background-position: center;
}

.material-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.8));
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.material-title {
  color: #0d47a1;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.material-meta {
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .sidebar {
    margin-left: -280px;
  }
  
  .content-wrapper {
    margin-left: 0;
  }
  
  .toggle-sidebar {
    display: flex;
    left: 1rem;
  }
  
  .sidebar-visible .sidebar {
    margin-left: 0;
  }
  
  .sidebar-visible .toggle-sidebar {
    left: 290px;
  }
}

/* Custom Button Styles */
.btn {
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  transition: all 0.2s;
}

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

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

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

.btn-secondary:hover {
  background-color: var(--secondary-dark);
  border-color: var(--secondary-dark);
}

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

/* Dashboard Styles */
.dashboard-header {
  margin-bottom: 2rem;
}

.welcome-message {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.date-display {
  color: var(--medium);
  font-size: 1rem;
}

/* Profile Styles */
.profile-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 2rem 0;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
}

.profile-photo-container {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto;
}

.profile-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 5px solid rgba(255, 255, 255, 0.5);
  object-fit: cover;
}

.profile-photo-edit {
  position: absolute;
  bottom: 0;
  right: 0;
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid white;
}

.badge-item {
  text-align: center;
  margin-bottom: 1.5rem;
}

.badge-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 2rem;
}

.badge-locked {
  opacity: 0.5;
  filter: grayscale(1);
}
