/**
 * Staff Management Styles
 * Styling for staff management interface
 * Version: 1.0.0 (2025-11-12)
 */

/* Container */
.staff-management-container {
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #333;
  margin: 0 0 8px 0;
}

.section-description {
  color: #666;
  font-size: 0.95rem;
  margin: 0;
}

/* Tutorial Card */
.tutorial-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
  display: flex;
  gap: 20px;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tutorial-icon {
  flex-shrink: 0;
}

.tutorial-icon i {
  font-size: 48px;
  opacity: 0.9;
}

.tutorial-content h3 {
  margin: 0 0 16px 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.tutorial-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.tutorial-content li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.tutorial-content li i {
  font-size: 20px;
  color: #4CAF50;
}

/* Staff Tabs */
.staff-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #E9ECEF;
  overflow-x: auto;
  flex-wrap: wrap;
}

.staff-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: #666;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.staff-tab:hover {
  color: #673AB7;
  background: rgba(103, 58, 183, 0.05);
}

.staff-tab.active {
  color: #673AB7;
  border-bottom-color: #673AB7;
}

.staff-tab i {
  font-size: 20px;
}

.staff-tab .badge {
  background: #673AB7;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

/* Tab Content */
.staff-tab-content {
  display: none;
}

.staff-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* Staff List */
.staff-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* Staff Card */
.staff-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  gap: 16px;
  align-items: center;
  transition: all 0.3s ease;
  border: 1px solid #E9ECEF;
}

.staff-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.staff-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
}

.staff-avatar i {
  font-size: 28px;
}

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

.staff-info h4 {
  margin: 0 0 4px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.staff-email {
  margin: 0 0 8px 0;
  font-size: 0.85rem;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.staff-role-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}

.staff-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* Invitations List */
.invitations-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.invitation-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #E9ECEF;
  border-left: 4px solid #FF9800;
}

.invitation-info h4 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
}

.invitation-email {
  margin: 0 0 8px 0;
  font-size: 0.9rem;
  color: #666;
}

.invitation-role-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #673AB7;
  color: white;
  margin-bottom: 12px;
}

.invitation-code {
  margin: 8px 0;
  font-size: 0.9rem;
  color: #333;
}

.invitation-code strong {
  font-family: 'Courier New', monospace;
  background: #F5F5F5;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.invitation-expires {
  margin: 8px 0 16px 0;
  font-size: 0.85rem;
  color: #FF9800;
}

.invitation-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.empty-state i {
  font-size: 64px;
  color: #DDD;
  margin-bottom: 16px;
}

.empty-state h3 {
  margin: 0 0 8px 0;
  font-size: 1.25rem;
  color: #666;
}

.empty-state p {
  margin: 0 0 24px 0;
  font-size: 0.95rem;
  color: #999;
}

/* Loading State */
.loading-state {
  text-align: center;
  padding: 60px 20px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #E9ECEF;
  border-top-color: #673AB7;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

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

.loading-state p {
  color: #999;
  font-size: 0.95rem;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 16px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  padding: 24px;
  border-bottom: 1px solid #E9ECEF;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
}

.modal-close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: #999;
  transition: all 0.3s ease;
  border-radius: 50%;
}

.modal-close:hover {
  background: #F5F5F5;
  color: #333;
}

.modal-close i {
  font-size: 24px;
}

.modal-body {
  padding: 24px;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
  font-size: 0.95rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #E9ECEF;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #673AB7;
  box-shadow: 0 0 0 3px rgba(103, 58, 183, 0.1);
}

.form-info {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: #E3F2FD;
  border-radius: 8px;
  margin-bottom: 20px;
}

.form-info i {
  color: #2196F3;
  font-size: 20px;
  flex-shrink: 0;
}

.form-info p {
  margin: 0;
  font-size: 0.85rem;
  color: #1976D2;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.btn i {
  font-size: 20px;
}

.btn-primary {
  background: #673AB7;
  color: white;
}

.btn-primary:hover {
  background: #5E35B1;
  box-shadow: 0 4px 12px rgba(103, 58, 183, 0.3);
  transform: translateY(-2px);
}

.btn-primary:disabled {
  background: #CCC;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: #F5F5F5;
  color: #666;
}

.btn-secondary:hover {
  background: #E9ECEF;
  color: #333;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.icon-button {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.3s ease;
  color: #666;
}

.icon-button:hover {
  background: #F5F5F5;
  color: #673AB7;
}

.icon-button i {
  font-size: 20px;
}

.spinning {
  animation: spin 1s linear infinite;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .staff-management-container {
    padding: 16px;
  }
  
  .section-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .section-header h2 {
    font-size: 1.5rem;
  }
  
  .tutorial-card {
    flex-direction: column;
    padding: 20px;
  }
  
  .tutorial-content ul {
    grid-template-columns: 1fr;
  }
  
  .staff-tabs {
    gap: 4px;
  }
  
  .staff-tab {
    padding: 10px 16px;
    font-size: 0.85rem;
  }
  
  .staff-list {
    grid-template-columns: 1fr;
  }
  
  .invitations-list {
    grid-template-columns: 1fr;
  }
  
  .staff-card {
    flex-direction: column;
    text-align: center;
  }
  
  .staff-info h4,
  .staff-email {
    white-space: normal;
  }
  
  .modal-content {
    max-width: 100%;
    margin: 0;
  }
  
  .modal-actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
  .staff-list {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .invitations-list {
    grid-template-columns: repeat(2, 1fr);
  }
}
