/* Smart Categories Styles */

.smart-categories-container {
  padding: 1.5rem;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
}

.smart-categories-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem;
  border-radius: 15px;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

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

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.page-description {
  font-size: 1.1rem;
  opacity: 0.9;
  margin: 0.5rem 0 0 0;
}

.header-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-filter-section {
  background: white;
  padding: 1.25rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.search-form .input-group {
  max-width: 400px;
}

.sort-form .form-select {
  border-radius: 8px;
}

.quick-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}

.categories-grid {
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
  padding: 0 1rem;
}

.category-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  margin-bottom: 0;
  overflow: hidden;
}

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

.card-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.category-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.category-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: #495057;
  line-height: 1.3;
}

.category-stats {
  margin-top: 0.25rem;
}

.news-count {
  font-size: 0.85rem;
  color: #6c757d;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.card-body {
  padding: 1rem 1.25rem;
}

.category-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.empty-icon {
  font-size: 4rem;
  color: #6c757d;
  margin-bottom: 1rem;
}

.empty-state h3 {
  color: #495057;
  margin-bottom: 1rem;
}

.empty-state p {
  color: #6c757d;
  margin-bottom: 2rem;
}

.form-section, .related-news-section, .warning-section, .category-info-section, .help-section {
  margin-bottom: 2rem;
}

.form-card, .related-news-card, .warning-card, .info-card, .help-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
  overflow: hidden;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: #495057;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-control {
  border-radius: 8px;
  border: 2px solid #e9ecef;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-control:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.form-text {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.update-news-section {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.section-title {
  font-weight: 600;
  color: #495057;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-check {
  margin-bottom: 1rem;
}

.form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid #dee2e6;
}

.form-check-label {
  font-weight: 500;
  color: #495057;
  margin-left: 0.5rem;
}

.news-count-info {
  font-size: 0.9rem;
  color: #6c757d;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.btn {
  border-radius: 6px;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
}

.btn-outline-secondary {
  border: 2px solid #6c757d;
  color: #6c757d;
}

.btn-outline-secondary:hover {
  background: #6c757d;
  border-color: #6c757d;
  color: white;
}

.btn-outline-info {
  border: 2px solid #17a2b8;
  color: #17a2b8;
}

.btn-outline-info:hover {
  background: #17a2b8;
  border-color: #17a2b8;
  color: white;
}

.btn-outline-warning {
  border: 2px solid #ffc107;
  color: #ffc107;
}

.btn-outline-warning:hover {
  background: #ffc107;
  border-color: #ffc107;
  color: #212529;
}

.btn-outline-danger {
  border: 2px solid #dc3545;
  color: #dc3545;
}

.btn-outline-danger:hover {
  background: #dc3545;
  border-color: #dc3545;
  color: white;
}

.btn-outline-light {
  border: 2px solid rgba(255,255,255,0.5);
  color: white;
}

.btn-outline-light:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.8);
  color: white;
}

.info-item {
  margin-bottom: 1.5rem;
}

.info-label {
  font-weight: 600;
  color: #6c757d;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.info-value {
  font-size: 1.1rem;
  font-weight: 500;
  color: #495057;
}

.news-stats {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.stat-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #495057;
}

.stat-label {
  font-size: 0.9rem;
  color: #6c757d;
}

.news-actions {
  text-align: center;
}

.news-list {
  max-height: 600px;
  overflow-y: auto;
}

.news-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
}

.news-item:hover {
  border-color: #667eea;
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.1);
}

.news-content {
  flex: 1;
  margin-right: 1rem;
}

.news-title {
  margin-bottom: 0.5rem;
}

.news-title a {
  color: #495057;
  text-decoration: none;
  font-weight: 500;
}

.news-title a:hover {
  color: #667eea;
  text-decoration: underline;
}

.news-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.news-source, .news-date {
  font-size: 0.85rem;
  color: #6c757d;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.no-news {
  text-align: center;
  padding: 3rem 2rem;
}

.no-news-icon {
  font-size: 4rem;
  color: #6c757d;
  margin-bottom: 1rem;
}

.no-news h6 {
  color: #495057;
  margin-bottom: 0.5rem;
}

.no-news p {
  color: #6c757d;
  margin: 0;
}

.warning-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.warning-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.warning-content h6 {
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
}

.warning-content p {
  color: #6c757d;
  margin: 0;
  font-size: 0.9rem;
}

.tip-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.tip-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.tip-content h6 {
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
}

.tip-content p {
  color: #6c757d;
  margin: 0;
  font-size: 0.9rem;
}

.pagination {
  margin-top: 2rem;
}

.page-link {
  border-radius: 8px;
  margin: 0 2px;
  border: 1px solid #dee2e6;
  color: #495057;
}

.page-item.active .page-link {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
}

/* Merge Categories Styles */
.merge-form-section {
  margin-bottom: 2rem;
}

.merge-form-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
  overflow: hidden;
}

.form-group {
  margin-bottom: 1.5rem;
}

.categories-list-section {
  margin-bottom: 2rem;
}

.categories-list-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
  overflow: hidden;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.category-item:hover {
  border-color: #667eea;
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.1);
}

.category-info h6 {
  margin: 0 0 0.5rem 0;
  color: #495057;
  font-weight: 600;
}

.category-stats {
  font-size: 0.9rem;
  color: #6c757d;
}

.category-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-outline-primary {
  border: 1px solid #667eea;
  color: #667eea;
}

.btn-outline-primary:hover {
  background: #667eea;
  border-color: #667eea;
  color: white;
}

.btn-outline-success {
  border: 1px solid #28a745;
  color: #28a745;
}

.btn-outline-success:hover {
  background: #28a745;
  border-color: #28a745;
  color: white;
}

.btn-outline-warning {
  border: 2px solid #ffc107;
  color: #ffc107;
}

.btn-outline-warning:hover {
  background: #ffc107;
  border-color: #ffc107;
  color: #212529;
}

.merge-preview {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.preview-title {
  font-weight: 600;
  color: #495057;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.preview-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.preview-item {
  flex: 1;
  text-align: center;
}

.preview-label {
  display: block;
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.preview-value {
  display: block;
  font-weight: 600;
  color: #495057;
}

.preview-item.source .preview-value {
  color: #dc3545;
}

.preview-item.target .preview-value {
  color: #28a745;
}

.preview-arrow {
  margin: 0 1rem;
  font-size: 1.5rem;
  color: #6c757d;
}

.preview-stats {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid #dee2e6;
}

.stat-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #495057;
}

.stat-item i {
  color: #667eea;
}

/* Medium screens */
@media (max-width: 992px) {
  .categories-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
  }
  
  .category-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .btn {
    width: 100%;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    text-align: center;
  }
  
  .page-title {
    font-size: 2rem;
  }
  
  .header-actions {
    justify-content: center;
  }
  
  .categories-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 0.5rem;
  }
  
  .category-card {
    margin-bottom: 0;
  }
  
  .category-actions {
    justify-content: center;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .btn {
    width: 100%;
    padding: 0.6rem 1rem;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
  
  .news-item {
    flex-direction: column;
    gap: 1rem;
  }
  
  .news-content {
    margin-right: 0;
  }
  
  .news-actions {
    align-self: stretch;
  }
  
  .stat-item {
    flex-direction: column;
    text-align: center;
  }
  
  .categories-grid {
    grid-template-columns: 1fr;
  }
  
  .category-item {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .category-actions {
    justify-content: center;
  }
  
  .preview-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  .preview-arrow {
    transform: rotate(90deg);
    margin: 0;
  }
}
