/* ===== FRIENDS DASHBOARD STYLES ===== */

/* Main Dashboard Container */
.friends-dashboard {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== HEADER SECTION ===== */
.dashboard-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  color: white;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 20px;
}

.title-icon {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.title-icon i {
  font-size: 28px;
  color: white;
}

.title-text h2 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 5px;
}

.title-text p {
  margin: 0;
  opacity: 0.9;
  font-size: 16px;
}

/* Header Stats */
.header-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.stat-card {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 15px;
  padding: 20px;
  min-width: 120px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.stat-card .stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  font-size: 18px;
}

.friends-stat .stat-icon {
  background: rgba(52, 211, 153, 0.3);
  color: #34d399;
}

.pending-stat .stat-icon {
  background: rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}

.sent-stat .stat-icon {
  background: rgba(59, 130, 246, 0.3);
  color: #3b82f6;
}

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

.stat-number {
  display: block;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 14px;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== DASHBOARD GRID ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

.dashboard-column {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* ===== CONTENT CARDS ===== */
.content-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.card-header-section {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  padding: 25px 30px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 15px;
}

.section-title i {
  font-size: 24px;
  color: #3b82f6;
  width: 40px;
  height: 40px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-title h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #1e293b;
}

.section-count {
  background: #3b82f6;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-left: 10px;
}

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

.btn-refresh {
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-refresh:hover {
  background: #3b82f6;
  color: white;
  transform: scale(1.1);
}

.btn-refresh.spinning i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== FRIENDS GRID ===== */
.friends-grid {
  padding: 30px;
  display: grid;
  gap: 20px;
}

.friend-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: #f8fafc;
  border-radius: 15px;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.friend-card:hover {
  background: white;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.friend-avatar {
  position: relative;
  flex-shrink: 0;
}

.friend-avatar img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e2e8f0;
  transition: border-color 0.3s ease;
}

.friend-card:hover .friend-avatar img {
  border-color: #3b82f6;
}

.online-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  background: #10b981;
  border: 3px solid white;
  border-radius: 50%;
}

.friend-info {
  flex: 1;
  min-width: 0;
}

.friend-name {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 5px;
}

.friend-fullname {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 3px;
}

.friend-bio {
  font-size: 13px;
  color: #64748b;
  font-style: italic;
  margin-bottom: 5px;
}

.friend-status {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 5px;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

.verified-badge i {
  font-size: 10px;
}

.fichas-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

.fichas-badge i {
  font-size: 10px;
}

.friend-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.btn-action {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.btn-message {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.btn-message:hover {
  background: #3b82f6;
  color: white;
  transform: scale(1.1);
}

.btn-remove {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.btn-remove:hover {
  background: #ef4444;
  color: white;
  transform: scale(1.1);
}

/* ===== SEARCH SECTION ===== */
.search-section {
  margin-top: 30px;
}

.search-container {
  padding: 30px;
}

.search-form {
  margin-bottom: 20px;
}

.search-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 20px;
  color: #94a3b8;
  font-size: 18px;
  z-index: 2;
}

.search-input {
  width: 100%;
  padding: 15px 20px 15px 50px;
  border: 2px solid #e2e8f0;
  border-radius: 15px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: #f8fafc;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
  background: white;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-btn {
  position: absolute;
  right: 5px;
  width: 40px;
  height: 40px;
  border: none;
  background: #3b82f6;
  color: white;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-btn:hover {
  background: #2563eb;
  transform: scale(1.1);
}

.clear-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  text-decoration: none;
  font-size: 14px;
  margin-top: 10px;
  transition: color 0.3s ease;
}

.clear-search:hover {
  color: #3b82f6;
}

.search-results-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
  color: #64748b;
}

.search-results-header i {
  color: #3b82f6;
}

.results-count {
  margin-left: auto;
  font-weight: 600;
}

/* ===== USERS GRID ===== */
.users-grid {
  padding: 30px;
  display: grid;
  gap: 20px;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: #f8fafc;
  border-radius: 15px;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.user-card:hover {
  background: white;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.user-avatar img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e2e8f0;
  transition: border-color 0.3s ease;
}

.user-card:hover .user-avatar img {
  border-color: #3b82f6;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 5px;
}

.user-fullname {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 3px;
}

.user-bio {
  font-size: 13px;
  color: #64748b;
  font-style: italic;
  margin-bottom: 5px;
}

.user-status {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 5px;
}

.user-actions {
  flex-shrink: 0;
}

.btn-primary {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

/* ===== PENDING REQUESTS ===== */
.requests-list {
  padding: 30px;
  display: grid;
  gap: 20px;
}

.request-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: #fef3c7;
  border-radius: 15px;
  border: 1px solid #fde68a;
  transition: all 0.3s ease;
}

.request-card:hover {
  background: #fefce8;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.request-avatar img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fde68a;
  transition: border-color 0.3s ease;
}

.request-card:hover .request-avatar img {
  border-color: #f59e0b;
}

.request-info {
  flex: 1;
  min-width: 0;
}

.request-name {
  font-size: 18px;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 5px;
}

.request-fullname {
  font-size: 14px;
  color: #a16207;
  margin-bottom: 3px;
}

.request-bio {
  font-size: 13px;
  color: #a16207;
  font-style: italic;
  margin-bottom: 5px;
}

.request-status {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 5px;
  margin-bottom: 5px;
}

.request-date {
  font-size: 12px;
  color: #f59e0b;
  font-style: italic;
}

.request-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.btn-success, .btn-danger {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.btn-success {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.btn-success:hover {
  background: #22c55e;
  color: white;
  transform: scale(1.1);
}

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

.btn-danger:hover {
  background: #ef4444;
  color: white;
  transform: scale(1.1);
}

/* ===== EMPTY STATES ===== */
.empty-state {
  padding: 60px 30px;
  text-align: center;
}

.empty-icon {
  width: 80px;
  height: 80px;
  background: #f1f5f9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 32px;
  color: #94a3b8;
}

.empty-state h4 {
  margin: 0 0 10px 0;
  font-size: 20px;
  font-weight: 600;
  color: #475569;
}

.empty-state p {
  margin: 0;
  color: #94a3b8;
  font-size: 16px;
  line-height: 1.5;
}

/* ===== PAGINATION ===== */
.pagination-section {
  padding: 20px 30px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.pagination-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.page-btn {
  width: 40px;
  height: 40px;
  border: 1px solid #e2e8f0;
  background: white;
  color: #64748b;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.page-btn:hover {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
  transform: translateY(-2px);
}

.page-btn.active {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.page-numbers {
  display: flex;
  gap: 5px;
}

/* ===== REAL-TIME SEARCH RESULTS ===== */
.realtime-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.realtime-result-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.realtime-result-item:hover {
  background: #f8fafc;
}

.realtime-result-item:last-child {
  border-bottom: none;
}

.result-avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.result-info {
  flex: 1;
  min-width: 0;
}

.result-name {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 3px;
}

.result-fullname {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 2px;
}

.result-bio {
  font-size: 12px;
  color: #64748b;
  font-style: italic;
  margin-bottom: 3px;
}

.result-status {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.result-action {
  width: 30px;
  height: 30px;
  background: #3b82f6;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .header-content {
    flex-direction: column;
    text-align: center;
  }
  
  .header-stats {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .friends-dashboard {
    padding: 15px;
  }
  
  .dashboard-header {
    padding: 20px;
    border-radius: 15px;
  }
  
  .title-text h2 {
    font-size: 24px;
  }
  
  .header-stats {
    flex-direction: column;
    width: 100%;
  }
  
  .stat-card {
    width: 100%;
    min-width: auto;
  }
  
  .friend-card, .user-card, .request-card {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  
  .friend-actions, .user-actions, .request-actions {
    justify-content: center;
  }
  
  .search-input-group {
    flex-direction: column;
    gap: 10px;
  }
  
  .search-btn {
    position: static;
    width: 100%;
    height: 45px;
  }
  
  .card-header-section {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .section-actions {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .title-icon {
    width: 50px;
    height: 50px;
  }
  
  .title-icon i {
    font-size: 24px;
  }
  
  .title-text h2 {
    font-size: 20px;
  }
  
  .stat-card {
    padding: 15px;
  }
  
  .stat-number {
    font-size: 24px;
  }
  
  .friends-grid, .users-grid, .requests-list {
    padding: 20px;
  }
  
  .friend-card, .user-card, .request-card {
    padding: 15px;
  }
  
  .friend-avatar img, .user-avatar img, .request-avatar img {
    width: 50px;
    height: 50px;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.friend-card, .user-card, .request-card {
  animation: fadeInUp 0.5s ease forwards;
}

.friend-card:nth-child(1) { animation-delay: 0.1s; }
.friend-card:nth-child(2) { animation-delay: 0.2s; }
.friend-card:nth-child(3) { animation-delay: 0.3s; }
.friend-card:nth-child(4) { animation-delay: 0.4s; }
.friend-card:nth-child(5) { animation-delay: 0.5s; }

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for accessibility */
.btn-action:focus,
.btn-primary:focus,
.btn-success:focus,
.btn-danger:focus,
.search-input:focus,
.page-btn:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .friend-card, .user-card, .request-card {
    border-width: 2px;
  }
  
  .stat-card {
    border: 2px solid rgba(255, 255, 255, 0.3);
  }
}

/* ===== SENT REQUESTS SECTION ===== */
.sent-section {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  margin-top: 20px;
}

.btn-warning {
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, #ff8a8e 0%, #febfdf 100%);
}

/* Estilos para o status online/offline dos amigos */
.friend-status {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.friend-status i {
  font-size: 8px;
}

.friend-status.text-success i {
  color: #28a745;
  animation: pulse 2s infinite;
}

.friend-status.text-muted i {
  color: #6c757d;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}
