body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

/* Modern Authentication Form Styles */
.auth-form {
  max-width: 420px;
  margin: 0 auto;
  padding: 2.5rem;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(20px);
          backdrop-filter: blur(20px);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-form h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: #2d3748;
  font-size: 1.875rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.form-row {
  display: flex;
  gap: 1rem;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #4a5568;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  background: rgba(255, 255, 255, 1);
  transform: translateY(-1px);
}

.form-group input.error {
  border-color: #e53e3e;
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.form-group input:disabled {
  background-color: #f7fafc;
  cursor: not-allowed;
  opacity: 0.6;
}

.error-message {
  display: block;
  color: #e53e3e;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  font-weight: 500;
}

.submit-error {
  background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
  border: 1px solid #fc8181;
  color: #742a2a;
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.submit-button {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.submit-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.submit-button:active:not(:disabled) {
  transform: translateY(0);
}

.submit-button:disabled {
  background: #a0aec0;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.auth-links {
  text-align: center;
  margin-top: 2rem;
}

.link-button {
  background: none;
  border: none;
  color: #667eea;
  text-decoration: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.link-button:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* Responsive design */
@media (max-width: 480px) {
  .auth-form {
    margin: 1rem;
    padding: 1.5rem;
  }
  
  .form-row {
    flex-direction: column;
    gap: 0;
  }
}
/*
 Welcome Screen Styles */
.welcome-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}

.welcome-card {
  max-width: 500px;
  width: 100%;
  padding: 3rem;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(20px);
          backdrop-filter: blur(20px);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
}

.welcome-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-subtitle {
  color: #718096;
  font-size: 1.125rem;
  margin-bottom: 2rem;
  font-weight: 500;
}

.user-info {
  background: rgba(102, 126, 234, 0.05);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(102, 126, 234, 0.1);
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

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

.info-label {
  font-weight: 600;
  color: #4a5568;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-value {
  color: #2d3748;
  font-weight: 500;
  font-size: 1rem;
}

.sign-out-button {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 15px rgba(229, 62, 62, 0.3);
}

.sign-out-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(229, 62, 62, 0.4);
}

.sign-out-button:active {
  transform: translateY(0);
}
/
* Loading Screen Styles */
.loading-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  text-align: center;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(102, 126, 234, 0.2);
  border-left: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

.loading-text {
  color: #4a5568;
  font-size: 1.125rem;
  font-weight: 500;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.category-filter {
  background: #f8f9fa;
  padding: 0.125rem;
  border-radius: 4px;
  margin-bottom: 0.125rem;
  border: 1px solid #e9ecef;
}

/* FORCE horizontal layout - NO wrapping */
.category-filter .unified-filter-row {
  display: flex !important;
  flex-direction: row !important;
  gap: 0.25rem !important;
  align-items: end !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
}

.category-filter .form-group {
  flex: 1 1 !important;
  min-width: 0 !important;
  max-width: none !important;
}

.category-filter .clear-filters {
  flex: 0 0 auto !important;
}

.category-filter .form-control {
  width: 100%;
  padding: 0.125rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.8rem;
  transition: border-color 0.2s ease;
}

.category-filter .form-control:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 1px rgba(0, 123, 255, 0.25);
}

.category-filter .form-control:disabled {
  background-color: #f8f9fa;
  color: #6c757d;
  cursor: not-allowed;
}

.category-filter label {
  display: block;
  margin-bottom: 0.0625rem;
  font-weight: 500;
  color: #333;
  font-size: 0.7rem;
}

.category-filter .btn {
  padding: 0.125rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-filter .btn-secondary {
  background-color: #6c757d;
  border-color: #6c757d;
  color: white;
}

.category-filter .btn-secondary:hover {
  background-color: #5a6268;
  border-color: #545b62;
}

.category-filter .btn-sm {
  padding: 0.125rem 0.5rem;
  font-size: 0.7rem;
}

.active-filters {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #dee2e6;
}

.filter-label {
  font-weight: 500;
  color: #495057;
  margin-right: 0.5rem;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  background-color: #007bff;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
  margin-right: 0.5rem;
  margin-bottom: 0.25rem;
}

.filter-remove {
  background: none;
  border: none;
  color: white;
  margin-left: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.filter-remove:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
  .category-filter .filter-row {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .category-filter .form-group {
    min-width: auto;
  }
  
  .category-filter .clear-filters {
    align-self: stretch;
  }
}
/* Attachment Viewer Modal */
.attachment-viewer-modal {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  max-width: 1000px;
  width: 95vw;
  max-height: 95vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s ease-out;
}

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

/* Header */
.attachment-viewer-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.attachment-viewer-modal .modal-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1 1;
  min-width: 0;
}

.attachment-viewer-modal .modal-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.attachment-viewer-modal .title-info {
  flex: 1 1;
  min-width: 0;
}

.attachment-viewer-modal .title-info h2 {
  margin: 0 0 0.25rem 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
}

.attachment-viewer-modal .file-name {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Content */
.attachment-viewer-modal .modal-content {
  flex: 1 1;
  position: relative;
  overflow: hidden;
  background: #f9fafb;
}

.preview-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Loading Overlay */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.loading-overlay .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f4f6;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

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

.loading-overlay p {
  color: #6b7280;
  font-size: 1rem;
  margin: 0;
}

/* Error State */
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  text-align: center;
}

.error-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.error-text h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #dc2626;
}

.error-text p {
  margin: 0 0 1.5rem 0;
  color: #6b7280;
  line-height: 1.5;
}

/* Image Preview */
.image-preview {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.image-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* PDF Preview */
.pdf-preview {
  width: 100%;
  height: 100%;
  padding: 1rem;
}

.pdf-preview iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Text Preview */
.text-preview {
  width: 100%;
  height: 100%;
  padding: 1rem;
}

.text-preview iframe {
  width: 100%;
  height: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: white;
}

/* No Preview */
.no-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  text-align: center;
}

.no-preview-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  opacity: 0.6;
}

.no-preview-text h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
}

.no-preview-text p {
  margin: 0 0 0.5rem 0;
  color: #6b7280;
  line-height: 1.5;
}

.no-preview-text p:last-child {
  margin-bottom: 0;
}

/* Footer */
.attachment-viewer-modal .modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-top: 1px solid #e5e7eb;
  background: white;
}

.file-info {
  display: flex;
  gap: 2rem;
  flex: 1 1;
}

.file-detail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.detail-label {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}

.detail-value {
  font-size: 0.875rem;
  color: #1f2937;
  font-weight: 600;
}

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

/* Button Styles */
.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: #3b82f6;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #2563eb;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover:not(:disabled) {
  background: #e5e7eb;
  transform: translateY(-1px);
}

.btn-close {
  background: none;
  color: #6b7280;
  font-size: 1.25rem;
  padding: 0.5rem;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.btn-icon {
  font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .attachment-viewer-modal {
    width: 98vw;
    max-height: 98vh;
  }
  
  .attachment-viewer-modal .modal-header {
    padding: 1rem 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .attachment-viewer-modal .modal-actions {
    align-self: stretch;
    justify-content: flex-end;
  }
  
  .attachment-viewer-modal .modal-footer {
    padding: 1rem 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .file-info {
    flex-direction: column;
    gap: 0.5rem;
    align-self: stretch;
  }
  
  .footer-actions {
    align-self: stretch;
    justify-content: flex-end;
  }
  
  .image-preview,
  .pdf-preview,
  .text-preview {
    padding: 1rem;
  }
  
  .no-preview {
    padding: 2rem 1rem;
  }
}

@media (max-width: 480px) {
  .attachment-viewer-modal .modal-header {
    padding: 1rem;
  }
  
  .attachment-viewer-modal .modal-footer {
    padding: 1rem;
  }
  
  .attachment-viewer-modal .title-info h2 {
    font-size: 1.25rem;
  }
  
  .attachment-viewer-modal .modal-icon {
    font-size: 1.5rem;
  }
  
  .no-preview-icon {
    font-size: 3rem;
  }
  
  .no-preview {
    padding: 1.5rem 1rem;
  }
}
/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

/* Modal Container */
.certification-detail-modal {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s ease-out;
}

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

/* Modal Header */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* Modal Content */
.modal-content {
  flex: 1 1;
  overflow-y: auto;
  padding: 2rem;
}

/* Certification Header */
.cert-header {
  margin-bottom: 2rem;
}

.cert-name-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.cert-name {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1 1;
  min-width: 0;
}

.cert-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* Status Badge */
.status-badge {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-badge.expired {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
  border: 1px solid #f87171;
}

.status-badge.urgent {
  background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
  color: #9a3412;
  border: 1px solid #fb923c;
}

.status-badge.soon {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border: 1px solid #fbbf24;
}

.status-badge.warning-90 {
  background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
  color: #a16207;
  border: 1px solid #facc15;
}

.status-badge.active {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  color: #166534;
  border: 1px solid #4ade80;
}

.status-badge.none {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  color: #0c4a6e;
  border: 1px solid #38bdf8;
}

/* Field Styling */
.cert-field {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.field-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.field-content {
  flex: 1 1;
  min-width: 0;
}

.field-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.field-value {
  font-size: 1rem;
  color: #1f2937;
  font-weight: 500;
  line-height: 1.5;
}

/* Date Fields */
.cert-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 1rem;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.cert-dates .cert-field {
  margin-bottom: 0;
}

.days-info {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 400;
}

.field-value.expired {
  color: #dc2626;
}

.field-value.urgent {
  color: #ea580c;
}

.field-value.soon {
  color: #ca8a04;
}

/* Category Fields */
.cert-categories {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 1rem;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.cert-categories .cert-field {
  margin-bottom: 0;
}

/* Notes Field */
.notes-field {
  margin-bottom: 1.5rem;
}

.notes-content {
  white-space: pre-wrap;
  line-height: 1.6;
  background: white;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

/* Instructor Field */
.instructor-field {
  margin-bottom: 1.5rem;
}

.instructor-info {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.instructor-name {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.instructor-email,
.instructor-phone,
.instructor-org {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

/* Attachments */
.attachments-field {
  margin-bottom: 1.5rem;
}

.loading-attachments {
  color: #6b7280;
  font-style: italic;
}

.attachments-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.attachment-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.attachment-item:hover {
  background: #f3f4f6;
  border-color: #3b82f6;
  transform: translateY(-1px);
}

.attachment-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.attachment-name {
  flex: 1 1;
  font-weight: 500;
  color: #1f2937;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-size {
  font-size: 0.875rem;
  color: #6b7280;
  flex-shrink: 0;
}

.no-attachments {
  color: #6b7280;
  font-style: italic;
  text-align: center;
  padding: 1rem;
}

/* Modal Footer */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-icon {
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
  transform: translateY(-1px);
}

.btn-close {
  background: none;
  color: #6b7280;
  padding: 0.5rem;
  font-size: 1.25rem;
  border-radius: 6px;
}

.btn-close:hover {
  background: #f3f4f6;
  color: #374151;
}

/* Responsive Design */
@media (max-width: 768px) {
  .modal-overlay {
    padding: 0.5rem;
  }

  .certification-detail-modal {
    max-height: 95vh;
  }

  .modal-header {
    padding: 1rem 1.5rem;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .modal-actions {
    justify-content: space-between;
  }

  .modal-content {
    padding: 1.5rem;
  }

  .cert-name-section {
    flex-direction: column;
    align-items: stretch;
  }

  .cert-name {
    font-size: 1.5rem;
  }

  .cert-dates,
  .cert-categories {
    grid-template-columns: 1fr;
  }

  .modal-footer {
    padding: 1rem 1.5rem;
    flex-direction: column;
  }

  .btn {
    justify-content: center;
  }
}

/* Print Styles */
@media print {
  .modal-overlay {
    position: static;
    background: none;
    padding: 0;
  }

  .certification-detail-modal {
    box-shadow: none;
    max-width: none;
    max-height: none;
    border-radius: 0;
  }

  .modal-header,
  .modal-footer {
    display: none;
  }

  .modal-content {
    padding: 0;
  }

  .cert-field {
    page-break-inside: avoid;
    break-inside: avoid;
    background: none;
    border: 1px solid #ccc;
  }

  .attachment-item {
    background: none;
    border: 1px solid #ccc;
  }
}
.error-boundary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 2rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  margin: 1rem 0;
}

.error-content {
  text-align: center;
  max-width: 500px;
}

.error-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.error-content h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #dc2626;
}

.error-content p {
  margin: 0 0 1.5rem 0;
  color: #6b7280;
  line-height: 1.5;
}

.error-details {
  margin: 1rem 0;
  text-align: left;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
}

.error-details summary {
  cursor: pointer;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.error-details pre {
  font-size: 0.75rem;
  color: #6b7280;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0.5rem 0;
  padding: 0.5rem;
  background: #f9fafb;
  border-radius: 4px;
  overflow-x: auto;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: #3b82f6;
  color: white;
}

.btn-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
}
/* CSS Custom Properties for Status Colors */
:root {
  --cert-color-expired: #ef4444;
  --cert-color-expired-hover: #dc2626;
  --cert-color-expired-bg: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
  
  --cert-color-urgent: #f97316;
  --cert-color-urgent-hover: #ea580c;
  --cert-color-urgent-bg: linear-gradient(135deg, #fff7ed 0%, #ffffff 100%);
  
  --cert-color-soon: #eab308;
  --cert-color-soon-hover: #ca8a04;
  --cert-color-soon-bg: linear-gradient(135deg, #fefce8 0%, #ffffff 100%);
  
  --cert-color-warning-90: #facc15;
  --cert-color-warning-90-hover: #eab308;
  --cert-color-warning-90-bg: linear-gradient(135deg, #fefce8 0%, #ffffff 100%);
  
  --cert-color-active: #22c55e;
  --cert-color-active-hover: #16a34a;
  --cert-color-active-bg: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
  
  --cert-border-width: 4px;
  --cert-border-radius: 12px;
  --cert-card-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
  --cert-card-shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.certification-list {
  width: 100%;
}

.certification-filters {
  margin-bottom: 0.25rem;
}

.certifications-summary {
  margin-bottom: 0.0625rem;
  margin-top: 0;
  padding: 0;
  color: #6c757d;
  font-size: 0.75rem;
}

.certifications-summary p {
  margin: 0;
  padding: 0;
  line-height: 1.2;
}

.certifications-content {
  width: 100%;
}

/* Grouped view styles */
.grouped-certifications {
  width: 100%;
}

.category-group {
  margin-bottom: 2.5rem;
}

h3.category-header {
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  color: #1f2937 !important;
  margin: 0 !important;
  margin-bottom: 0.75rem !important;
  padding: 1rem 1.5rem !important;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
  color: white !important;
  border: none !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
  transform: translateZ(0) !important;
}

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

h4.subcategory-header {
  font-size: 1rem !important;
  font-weight: 500 !important;
  color: #495057 !important;
  margin: 0 !important;
  margin-bottom: 0.25rem !important;
  margin-left: 2rem !important;
  padding: 0.5rem 1rem !important;
  background: linear-gradient(135deg, #f8f9fa 0%, #e5e7eb 100%) !important;
  border: 1px solid #d1d5db !important;
  border-left: 4px solid #6b7280 !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
}

/* Compact grid layout for certifications */
.certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-gap: 0.75rem;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  padding: 0.25rem;
}

/* Enhanced responsive grid layout for compact design */
@media (min-width: 1200px) {
  .certifications-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0.875rem;
  }
}

@media (max-width: 1024px) {
  .certifications-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.625rem;
  }
}

/* Compact Certification card styles with prominent borders */
.certification-list .certification-card {
  background: white;
  border: 4px solid #d1d5db;
  border: var(--cert-border-width) solid #d1d5db;
  border-radius: 12px;
  border-radius: var(--cert-border-radius);
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
  box-shadow: var(--cert-card-shadow);
  overflow: hidden;
  position: relative;
  margin-bottom: 0.5rem;
}

.certification-list .certification-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  box-shadow: var(--cert-card-shadow-hover);
}

/* Expired - Bright Red Border with high specificity */
.certification-list .certifications-content .certification-card.expired {
  border: 4px solid #ef4444 !important;
  border: var(--cert-border-width) solid var(--cert-color-expired) !important;
  background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%) !important;
  background: var(--cert-color-expired-bg) !important;
}

.certification-list .certifications-content .certification-card.expired:hover {
  border-color: #dc2626 !important;
  border-color: var(--cert-color-expired-hover) !important;
}

/* Urgent (7 days) - Bright Orange Border with high specificity */
.certification-list .certifications-content .certification-card.urgent {
  border: 4px solid #f97316 !important;
  border: var(--cert-border-width) solid var(--cert-color-urgent) !important;
  background: linear-gradient(135deg, #fff7ed 0%, #ffffff 100%) !important;
  background: var(--cert-color-urgent-bg) !important;
}

.certification-list .certifications-content .certification-card.urgent:hover {
  border-color: #ea580c !important;
  border-color: var(--cert-color-urgent-hover) !important;
}

/* Soon (30 days) - Bright Yellow Border with high specificity */
.certification-list .certifications-content .certification-card.soon {
  border: 4px solid #eab308 !important;
  border: var(--cert-border-width) solid var(--cert-color-soon) !important;
  background: linear-gradient(135deg, #fefce8 0%, #ffffff 100%) !important;
  background: var(--cert-color-soon-bg) !important;
}

.certification-list .certifications-content .certification-card.soon:hover {
  border-color: #ca8a04 !important;
  border-color: var(--cert-color-soon-hover) !important;
}

/* Warning 90 days - Light Yellow Border with high specificity */
.certification-list .certifications-content .certification-card.warning-90 {
  border: 4px solid #facc15 !important;
  border: var(--cert-border-width) solid var(--cert-color-warning-90) !important;
  background: linear-gradient(135deg, #fefce8 0%, #ffffff 100%) !important;
  background: var(--cert-color-warning-90-bg) !important;
}

.certification-list .certifications-content .certification-card.warning-90:hover {
  border-color: #eab308 !important;
  border-color: var(--cert-color-warning-90-hover) !important;
}

/* Active and None (no expiration) - Bright Green Border with high specificity */
.certification-list .certifications-content .certification-card.active,
.certification-list .certifications-content .certification-card.none {
  border: 4px solid #22c55e !important;
  border: var(--cert-border-width) solid var(--cert-color-active) !important;
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%) !important;
  background: var(--cert-color-active-bg) !important;
}

.certification-list .certifications-content .certification-card.active:hover,
.certification-list .certifications-content .certification-card.none:hover {
  border-color: #16a34a !important;
  border-color: var(--cert-color-active-hover) !important;
}

/* Compact Card Header */
.certification-header {
  padding: 0.5rem 0.75rem 0 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0;
}

/* Modern Expiration warning banner */
.expiration-warning {
  margin: 0;
  padding: 0.875rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  border-radius: 16px 16px 0 0;
  position: relative;
}

.expiration-warning.expired {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
  border-bottom: 3px solid #ef4444;
}

.expiration-warning.urgent {
  background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
  color: #9a3412;
  border-bottom: 3px solid #f97316;
}

.expiration-warning.soon {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border-bottom: 3px solid #eab308;
}

.expiration-warning.warning-90 {
  background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
  color: #a16207;
  border-bottom: 3px solid #facc15;
}

.warning-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

/* Compact certification name styling */
.certification-name {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
  flex: 1 1;
  margin-right: 0.75rem;
  line-height: 1.2;
}

/* Modern action buttons */
.certification-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.certification-card:hover .certification-actions {
  opacity: 1;
}

.certification-actions .btn {
  padding: 0.375rem 0.75rem;
  border: none;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.certification-actions .btn-secondary {
  background-color: #6b7280;
  color: white;
}

.certification-actions .btn-secondary:hover {
  background-color: #4b5563;
  transform: translateY(-1px);
}

.certification-actions .btn-danger {
  background-color: #ef4444;
  color: white;
}

.certification-actions .btn-danger:hover {
  background-color: #dc2626;
  transform: translateY(-1px);
}

/* Compact card content */
.certification-details {
  padding: 0.5rem 0.75rem 0.75rem 0.75rem;
  color: #4b5563;
}

/* Modern issuing organization */
.issuing-organization {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #374151;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.issuing-organization::before {
  content: "🏢";
  font-size: 0.75rem;
}

/* Modern date styling */
.certification-dates {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}

.obtained-date {
  color: #059669;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.obtained-date::before {
  content: "✅";
  font-size: 0.75rem;
}

.expiration-date {
  color: #6b7280;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.expiration-date::before {
  content: "📅";
  font-size: 0.75rem;
}

.expiration-date.expired {
  color: #dc2626;
  font-weight: 600;
}

.expiration-date.expired::before {
  content: "⚠️";
}

.expiration-date.urgent {
  color: #ea580c;
  font-weight: 600;
}

.expiration-date.urgent::before {
  content: "🔥";
}

.expiration-date.soon {
  color: #ca8a04;
  font-weight: 600;
}

.expiration-date.soon::before {
  content: "⏰";
}

/* Modern badges */
.certification-category {
  margin-bottom: 0.5rem;
}

.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  color: #374151;
  padding: 0.375rem 0.625rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid #d1d5db;
}

.category-badge::before {
  content: "📂";
  font-size: 0.7rem;
}

.renewal-indicator {
  margin-bottom: 0.5rem;
}

.renewal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  color: white;
  padding: 0.375rem 0.625rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(6, 182, 212, 0.2);
}

.renewal-badge::before {
  content: "🔄";
  font-size: 0.75rem;
}

/* Modern notes section */
.certification-notes {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 2px solid #f3f4f6;
  background: #f9fafb;
  margin-left: -0.75rem;
  margin-right: -0.75rem;
  margin-bottom: -0.75rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  padding-bottom: 0.75rem;
  border-radius: 0 0 16px 16px;
}

.certification-notes p {
  margin: 0;
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.5;
  font-style: italic;
}

/* No certifications message */
.no-certifications {
  text-align: center;
  padding: 3rem 1rem;
  color: #6c757d;
}

.no-certifications p {
  font-size: 1.1rem;
  margin: 0;
}

/* Responsive design */
@media (max-width: 768px) {
  .certifications-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .certification-header {
    padding: 1rem 1rem 0 1rem;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }

  .certification-actions {
    align-self: flex-end;
    opacity: 1;
  }

  .certification-name {
    margin-right: 0;
    font-size: 1.125rem;
  }

  .certification-details {
    padding: 0.75rem 1rem 1rem 1rem;
  }

  .expiration-warning {
    padding: 0.75rem 1rem;
  }

  .certification-notes {
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .category-header {
    font-size: 1.3rem;
  }

  .subcategory-header {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .certifications-grid {
    gap: 0.5rem;
  }

  .certification-header {
    padding: 0.75rem 0.75rem 0 0.75rem;
  }

  .certification-details {
    padding: 0.5rem 0.75rem 0.75rem 0.75rem;
  }

  .certification-name {
    font-size: 1rem;
  }

  .expiration-warning {
    padding: 0.625rem 0.75rem;
    font-size: 0.8rem;
  }

  .certification-notes {
    margin-left: -0.75rem;
    margin-right: -0.75rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .certification-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
  }
}
/* Print Dialog Modal */
.print-dialog-modal {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  max-width: 1000px;
  width: 95vw;
  max-height: 95vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s ease-out;
}

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

/* Header */
.print-dialog-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.print-dialog-modal .modal-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.print-dialog-modal .modal-icon {
  font-size: 1.5rem;
}

.print-dialog-modal .modal-title h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
}

/* Content */
.print-dialog-modal .modal-content {
  flex: 1 1;
  overflow-y: auto;
  padding: 0;
}

.print-dialog-content {
  display: grid;
  grid-template-columns: 1fr 1fr 300px;
  grid-gap: 0;
  gap: 0;
  height: 100%;
}

/* Sections */
.filters-section,
.options-section,
.preview-section {
  padding: 2rem;
  border-right: 1px solid #e5e7eb;
}

.preview-section {
  border-right: none;
  background: #f9fafb;
}

.filters-section h3,
.options-section h3,
.preview-section h3 {
  margin: 0 0 1.5rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Filter Groups */
.filter-group,
.option-group {
  margin-bottom: 2rem;
}

.filter-group:last-child,
.option-group:last-child {
  margin-bottom: 0;
}

.filter-group h4,
.option-group h4 {
  margin: 0 0 1rem 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Radio Groups */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.radio-option input[type="radio"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.radio-label {
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
}

/* Checkbox Groups */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 200px;
  overflow-y: auto;
}

.checkbox-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.checkbox-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.checkbox-label {
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
}

/* Search Input */
.search-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #1f2937;
  background: white;
  transition: border-color 0.2s ease;
}

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

/* Filter Actions */
.filter-actions {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

/* Paper Options */
.paper-options {
  display: flex;
  gap: 1rem;
}

.paper-option {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.paper-option label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.paper-option select {
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #1f2937;
  background: white;
  cursor: pointer;
}

.paper-option select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Preview Section */
.preview-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.preview-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.stat-label {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}

.stat-value {
  font-size: 0.875rem;
  color: #1f2937;
  font-weight: 600;
}

/* Footer */
.print-dialog-modal .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid #e5e7eb;
  background: white;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: #3b82f6;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #2563eb;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover:not(:disabled) {
  background: #e5e7eb;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

.btn-close {
  background: none;
  color: #6b7280;
  font-size: 1.25rem;
  padding: 0.5rem;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.btn-icon {
  font-size: 1rem;
}

.btn-spinner {
  font-size: 1rem;
  animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .print-dialog-content {
    grid-template-columns: 1fr 1fr;
  }
  
  .preview-section {
    grid-column-start: 1;
    grid-column-end: -1;
    border-right: none;
    border-top: 1px solid #e5e7eb;
  }
}

@media (max-width: 768px) {
  .print-dialog-modal {
    width: 98vw;
    max-height: 98vh;
  }
  
  .print-dialog-content {
    grid-template-columns: 1fr;
  }
  
  .filters-section,
  .options-section,
  .preview-section {
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.5rem;
  }
  
  .preview-section {
    border-bottom: none;
  }
  
  .print-dialog-modal .modal-header,
  .print-dialog-modal .modal-footer {
    padding: 1rem 1.5rem;
  }
  
  .paper-options {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .print-dialog-modal .modal-header,
  .print-dialog-modal .modal-footer {
    padding: 1rem;
  }
  
  .filters-section,
  .options-section,
  .preview-section {
    padding: 1rem;
  }
  
  .print-dialog-modal .modal-title h2 {
    font-size: 1.25rem;
  }
  
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
}
/* Export Dropdown */
.export-dropdown {
  position: relative;
  display: inline-block;
}

.export-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.export-trigger:hover:not(:disabled) {
  background: #e5e7eb;
  border-color: #9ca3af;
  transform: translateY(-1px);
}

.export-trigger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-icon {
  font-size: 1rem;
}

.dropdown-arrow {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

/* Export Menu */
.export-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1000;
  min-width: 280px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  margin-top: 0.5rem;
  overflow: hidden;
  animation: dropdownSlideIn 0.2s ease-out;
}

@keyframes dropdownSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.export-section {
  padding: 0.75rem 0;
}

.export-section:not(:last-child) {
  border-bottom: 1px solid #f3f4f6;
}

.section-header {
  padding: 0 1rem 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.export-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.export-option:hover {
  background: #f9fafb;
}

.option-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.option-content {
  flex: 1 1;
}

.option-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.125rem;
}

.option-description {
  font-size: 0.75rem;
  color: #6b7280;
}

.export-info {
  padding: 0.75rem 1rem;
  background: #f9fafb;
  border-top: 1px solid #f3f4f6;
}

.info-text {
  font-size: 0.75rem;
  color: #6b7280;
  text-align: center;
  display: block;
}

/* Export Overlay */
.export-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
}

/* Export Progress */
.export-progress {
  display: inline-block;
  padding: 0.75rem 1rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 250px;
}

.progress-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.progress-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.progress-icon {
  font-size: 1rem;
  animation: pulse 2s infinite;
}

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

.progress-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1f2937;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #f3f4f6;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-message {
  font-size: 0.75rem;
  color: #6b7280;
}

.progress-count {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
}

/* Button Styles */
.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: #3b82f6;
  color: white;
}

.btn-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover {
  background: #e5e7eb;
  transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .export-menu {
    right: auto;
    left: 0;
    min-width: 260px;
  }
}

@media (max-width: 480px) {
  .export-trigger {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
  
  .btn-text {
    display: none;
  }
  
  .export-menu {
    min-width: 240px;
  }
}
.dashboard-stats {
  background: white;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
  flex: 1 1;
}

/* Compact horizontal stats row */
.stats-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  min-width: 0;
  flex-shrink: 0;
}

.stat-item:hover {
  transform: translateY(-1px);
}

/* Stat item variants */
.stat-primary {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border: 1px solid #93c5fd;
}

.stat-success {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border: 1px solid #86efac;
}

.stat-warning {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #fcd34d;
}

.stat-urgent {
  background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
  border: 1px solid #fb923c;
}

.stat-danger {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border: 1px solid #f87171;
}

.stat-info {
  background: linear-gradient(135deg, #e0f2fe 0%, #b3e5fc 100%);
  border: 1px solid #4fc3f7;
}

.stat-info-90 {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #7dd3fc;
}

.stat-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.stat-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stat-number {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1;
  margin: 0;
}

.stat-label {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
  margin: 0;
  white-space: nowrap;
}

/* Compact Alert Summary */
.alert-summary {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.alert-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.alert-badge.alert-danger {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
  border: 1px solid #f87171;
}

.alert-badge.alert-urgent {
  background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
  color: #9a3412;
  border: 1px solid #fb923c;
}

/* Responsive design */
@media (max-width: 768px) {
  .dashboard-stats {
    padding: 0.75rem;
  }
  
  .stats-row {
    gap: 0.75rem;
  }
  
  .stat-item {
    padding: 0.375rem 0.5rem;
  }
  
  .stat-icon {
    font-size: 1rem;
  }
  
  .stat-number {
    font-size: 1rem;
  }
  
  .stat-label {
    font-size: 0.7rem;
  }
  
  .alert-summary {
    margin-top: 0.5rem;
    gap: 0.375rem;
  }
  
  .alert-badge {
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .dashboard-stats {
    padding: 0.5rem;
  }
  
  .stats-row {
    gap: 0.5rem;
    justify-content: center;
  }
  
  .stat-item {
    padding: 0.25rem 0.375rem;
    min-width: auto;
  }
  
  .stat-icon {
    font-size: 0.875rem;
  }
  
  .stat-number {
    font-size: 0.875rem;
  }
  
  .stat-label {
    font-size: 0.65rem;
  }
  
  .alert-summary {
    justify-content: center;
  }
}
.sort-controls {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.sort-field-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sort-label {
  font-weight: 500;
  color: #495057;
  margin: 0;
  white-space: nowrap;
}

.sort-select {
  padding: 0.5rem 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  background-color: white;
  color: #495057;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sort-select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.sort-direction-group {
  display: flex;
  align-items: center;
}

.sort-direction-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  background-color: white;
  color: #495057;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sort-direction-btn:hover {
  background-color: #f8f9fa;
  border-color: #007bff;
}

.sort-direction-btn:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.sort-direction-btn.asc {
  color: #007bff;
}

.sort-direction-btn.desc {
  color: #007bff;
}

.sort-icon {
  font-size: 1.1rem;
  font-weight: bold;
  line-height: 1;
}

.sort-direction-text {
  font-weight: 500;
  white-space: nowrap;
}

.sort-quick-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.quick-sort-btn {
  padding: 0.5rem 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  background-color: white;
  color: #495057;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.quick-sort-btn:hover {
  background-color: #f8f9fa;
  border-color: #007bff;
  color: #007bff;
}

.quick-sort-btn:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.quick-sort-btn.active {
  background-color: #007bff;
  border-color: #007bff;
  color: white;
}

.quick-sort-btn.active:hover {
  background-color: #0056b3;
  border-color: #0056b3;
  color: white;
}

/* Responsive design */
@media (max-width: 768px) {
  .sort-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .sort-field-group,
  .sort-direction-group {
    justify-content: center;
  }
  
  .sort-quick-actions {
    justify-content: center;
  }
  
  .sort-direction-text {
    display: none;
  }
  
  .sort-direction-btn {
    min-width: 40px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .sort-controls {
    gap: 0.75rem;
  }
  
  .sort-field-group {
    flex-direction: column;
    gap: 0.25rem;
    text-align: center;
  }
  
  .sort-select {
    width: 100%;
  }
  
  .quick-sort-btn {
    flex: 1 1;
    min-width: 0;
    font-size: 0.8rem;
    padding: 0.4rem 0.5rem;
  }
}
.dashboard {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
  background: #f8f9fa;
  min-height: 100vh;
}

/* Compact Header */
.dashboard-header {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
}

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

.header-text h1 {
  font-size: 1.75rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 0.25rem 0;
}

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

.header-status {
  flex-shrink: 0;
}

/* Compact Toolbar */
.dashboard-toolbar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: stretch;
}

.toolbar-controls {
  background: white;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
  flex-shrink: 0;
}

/* Main Content */
.dashboard-main {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
}

.dashboard-certification-list {
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

/* Loading state */
.dashboard-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

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

.dashboard-loading p {
  color: #6c757d;
  font-size: 1.1rem;
}

/* Error state */
.dashboard-error {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard-error h3 {
  color: #dc3545;
  margin-bottom: 1rem;
}

.dashboard-error p {
  color: #6c757d;
  margin-bottom: 2rem;
}

.dashboard-error .btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.dashboard-error .btn-primary {
  background-color: #007bff;
  color: white;
}

.dashboard-error .btn-primary:hover {
  background-color: #0056b3;
}

/* Message state */
.dashboard-message {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard-message p {
  color: #6c757d;
  font-size: 1.1rem;
  margin: 0;
}

/* Responsive design */
@media (max-width: 768px) {
  .dashboard {
    padding: 0.75rem;
  }
  
  .dashboard-header {
    padding: 1rem;
  }
  
  .header-content {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .header-text h1 {
    font-size: 1.5rem;
  }
  
  .dashboard-toolbar {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .toolbar-controls {
    padding: 0.75rem;
  }
  
  .dashboard-main {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .dashboard {
    padding: 0.5rem;
  }
  
  .dashboard-header {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
  }
  
  .header-text h1 {
    font-size: 1.25rem;
  }
  
  .header-text p {
    font-size: 0.8rem;
  }
  
  .dashboard-toolbar {
    gap: 0.5rem;
  }
  
  .toolbar-controls {
    padding: 0.5rem;
  }
  
  .dashboard-main {
    padding: 0.75rem;
  }
}
.certifications-page {
  max-width: 1200px;
  margin: 0 auto;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  gap: 2rem;
}

.header-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

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

.add-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-icon {
  font-size: 1.1rem;
}

.btn-text {
  white-space: nowrap;
}

.page-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

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

.page-loading p {
  color: #6c757d;
  font-size: 1.1rem;
  margin: 0;
}

.page-error {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.page-error h3 {
  color: #dc3545;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.page-error p {
  color: #6c757d;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.retry-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.retry-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.page-message {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.page-message p {
  color: #6c757d;
  font-size: 1.1rem;
  margin: 0;
}

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

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  opacity: 0.6;
}

.empty-state h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 1rem;
}

.empty-state p {
  color: #6c757d;
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.empty-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.empty-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.certifications-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.certifications-summary {
  background: white;
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  grid-gap: 2rem;
  gap: 2rem;
}

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

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.page-certification-list {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
  }
  
  .header-content h1 {
    font-size: 2rem;
  }
  
  .add-btn {
    justify-content: center;
  }
  
  .btn-text {
    white-space: normal;
  }
  
  .summary-stats {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .certifications-summary,
  .page-certification-list {
    padding: 1.5rem;
  }
  
  .empty-state {
    padding: 3rem 1.5rem;
  }
  
  .empty-icon {
    font-size: 3rem;
  }
}

@media (max-width: 480px) {
  .header-content h1 {
    font-size: 1.75rem;
  }
  
  .summary-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .certifications-summary,
  .page-certification-list {
    padding: 1rem;
  }
  
  .empty-state {
    padding: 2rem 1rem;
  }
  
  .empty-state h3 {
    font-size: 1.25rem;
  }
  
  .empty-state p {
    font-size: 1rem;
  }
}
.file-upload {
  margin: 1rem 0;
}

.file-upload-area {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #fafafa;
}

.file-upload-area:hover:not(.disabled) {
  border-color: #007bff;
  background-color: #f0f8ff;
}

.file-upload-area.drag-active {
  border-color: #007bff;
  background-color: #e6f3ff;
  transform: scale(1.02);
}

.file-upload-area.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: #f5f5f5;
}

.upload-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.upload-text {
  font-size: 1.1rem;
  margin: 0;
  color: #333;
}

.upload-link {
  color: #007bff;
  text-decoration: underline;
}

.upload-hint {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
}

/* Responsive design */
@media (max-width: 768px) {
  .file-upload-area {
    padding: 1.5rem;
  }
  
  .upload-icon {
    font-size: 2rem;
  }
  
  .upload-text {
    font-size: 1rem;
  }
  
  .upload-hint {
    font-size: 0.8rem;
  }
}
.file-attachment-list {
  margin: 1rem 0;
}

.file-attachment-list.empty {
  text-align: center;
  padding: 1rem;
  color: #666;
  font-style: italic;
}

.empty-message {
  margin: 0;
}

.attachments-title {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  color: #333;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
}

.attachments-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

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

.attachment-item:hover {
  background-color: #f0f0f0;
  border-color: #ccc;
}

.attachment-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1 1;
  min-width: 0; /* Allow text truncation */
}

.attachment-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.attachment-details {
  flex: 1 1;
  min-width: 0;
}

.attachment-name {
  margin: 0 0 0.25rem 0;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-meta {
  margin: 0 0 0.25rem 0;
  font-size: 0.9rem;
  color: #666;
}

.attachment-date {
  margin: 0;
  font-size: 0.8rem;
  color: #888;
}

.attachment-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.action-button {
  background: none;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.action-button:hover:not(:disabled) {
  background-color: #f0f0f0;
  border-color: #ccc;
}

.action-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.download-button:hover:not(:disabled) {
  background-color: #e6f3ff;
  border-color: #007bff;
}

.delete-button:hover:not(:disabled) {
  background-color: #ffe6e6;
  border-color: #dc3545;
}

/* Responsive design */
@media (max-width: 768px) {
  .attachment-item {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .attachment-info {
    gap: 0.75rem;
  }
  
  .attachment-icon {
    font-size: 1.5rem;
  }
  
  .attachment-actions {
    justify-content: center;
  }
  
  .action-button {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .attachment-item {
    padding: 0.75rem;
  }
  
  .attachments-title {
    font-size: 1rem;
  }
}
.notes-editor {
  border: 1px solid #ddd;
  border-radius: 8px;
  background: white;
  transition: border-color 0.2s ease;
}

.notes-editor.focused {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.notes-editor.disabled {
  background-color: #f8f9fa;
  opacity: 0.6;
}

.notes-editor-toolbar {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #eee;
  background-color: #f8f9fa;
  border-radius: 8px 8px 0 0;
  gap: 4px;
}

.toolbar-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 14px;
  color: #495057;
  transition: all 0.2s ease;
  min-width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toolbar-btn:hover:not(:disabled) {
  background-color: #e9ecef;
  border-color: #ced4da;
}

.toolbar-btn:active:not(:disabled) {
  background-color: #dee2e6;
}

.toolbar-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.toolbar-separator {
  width: 1px;
  height: 20px;
  background-color: #dee2e6;
  margin: 0 4px;
}

.notes-textarea {
  width: 100%;
  border: none;
  padding: 12px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  min-height: 120px;
  outline: none;
  background: transparent;
}

.notes-textarea:disabled {
  background-color: transparent;
  color: #6c757d;
}

.notes-textarea::placeholder {
  color: #6c757d;
  font-style: italic;
}

.notes-editor-footer {
  display: flex;
  justify-content: flex-end;
  padding: 8px 12px;
  border-top: 1px solid #eee;
  background-color: #f8f9fa;
  border-radius: 0 0 8px 8px;
}

.character-count {
  font-size: 12px;
  color: #6c757d;
}

.character-count .warning {
  color: #dc3545;
  font-weight: 500;
}

/* Touch-friendly mobile styles */
@media (max-width: 768px) {
  .notes-editor {
    margin: 12px 0;
  }
  
  .notes-editor-toolbar {
    padding: 8px 12px;
    gap: 6px;
    flex-wrap: wrap;
  }
  
  .toolbar-btn {
    min-width: 36px;
    height: 36px;
    padding: 6px 10px;
    font-size: 14px;
    touch-action: manipulation;
  }
  
  .toolbar-btn:active {
    background-color: #007bff;
    color: white;
    transform: scale(0.95);
  }
  
  .notes-textarea {
    padding: 16px;
    font-size: 16px; /* Prevents zoom on iOS */
    line-height: 1.6;
    min-height: 150px;
    touch-action: manipulation;
  }
  
  .notes-editor-footer {
    padding: 8px 12px;
  }
  
  .character-count {
    font-size: 13px;
  }
}

/* Extra small screens (phones in portrait) */
@media (max-width: 480px) {
  .notes-editor-toolbar {
    padding: 6px 8px;
    gap: 4px;
  }
  
  .toolbar-btn {
    min-width: 32px;
    height: 32px;
    padding: 4px 8px;
    font-size: 13px;
  }
  
  .notes-textarea {
    padding: 12px;
    min-height: 120px;
  }
  
  .notes-editor-footer {
    padding: 6px 8px;
  }
  
  .character-count {
    font-size: 12px;
  }
}

/* Tablet styles */
@media (min-width: 769px) and (max-width: 1024px) {
  .notes-editor {
    margin: 16px 0;
  }
  
  .toolbar-btn {
    min-width: 32px;
    height: 32px;
    padding: 6px 10px;
  }
  
  .notes-textarea {
    padding: 14px;
    font-size: 15px;
    min-height: 140px;
  }
}
.instructor-contact-form {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  margin: 16px 0;
}

.instructor-contact-form.disabled {
  opacity: 0.6;
  background-color: #f1f3f4;
}

.form-section-header {
  margin-bottom: 20px;
}

.form-section-header h3 {
  margin: 0 0 8px 0;
  color: #495057;
  font-size: 18px;
  font-weight: 600;
}

.form-section-description {
  margin: 0;
  color: #6c757d;
  font-size: 14px;
  line-height: 1.4;
}

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.form-row:last-child {
  margin-bottom: 0;
}

.form-group {
  flex: 1 1;
  min-width: 0;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #495057;
  font-size: 14px;
}

.form-group label.required::after {
  content: ' *';
  color: #dc3545;
}

.form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
  color: #495057;
  background-color: white;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-group input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-group input:disabled {
  background-color: #e9ecef;
  opacity: 1;
  color: #6c757d;
}

.form-group input.error {
  border-color: #dc3545;
}

.form-group input.error:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25);
}

.form-group input::placeholder {
  color: #6c757d;
  opacity: 1;
}

.field-error {
  margin-top: 4px;
  font-size: 12px;
  color: #dc3545;
  line-height: 1.3;
}

.form-errors {
  margin-top: 16px;
  padding: 12px;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 6px;
  color: #721c24;
}

.error-summary {
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 14px;
}

.error-list {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
}

.error-list li {
  margin-bottom: 4px;
}

.error-list li:last-child {
  margin-bottom: 0;
}

/* Touch-friendly mobile styles */
@media (max-width: 768px) {
  .instructor-contact-form {
    padding: 16px;
    margin: 12px 0;
    border-radius: 12px;
  }
  
  .form-section-header h3 {
    font-size: 18px;
    margin-bottom: 6px;
  }
  
  .form-section-description {
    font-size: 14px;
    line-height: 1.5;
  }
  
  .form-row {
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
  }
  
  .form-group input {
    padding: 14px 16px;
    font-size: 16px; /* Prevents zoom on iOS */
    border-radius: 8px;
    min-height: 48px; /* Touch-friendly minimum */
    touch-action: manipulation;
  }
  
  .form-group input:focus {
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
  }
  
  .form-group label {
    font-size: 14px;
    margin-bottom: 8px;
  }
  
  .field-error {
    font-size: 12px;
    margin-top: 6px;
  }
  
  .form-errors {
    margin-top: 20px;
    padding: 16px;
    border-radius: 8px;
  }
  
  .error-summary {
    font-size: 15px;
    margin-bottom: 10px;
  }
  
  .error-list {
    font-size: 14px;
  }
}

/* Extra small screens (phones in portrait) */
@media (max-width: 480px) {
  .instructor-contact-form {
    padding: 12px;
    margin: 8px 0;
  }
  
  .form-section-header {
    margin-bottom: 16px;
  }
  
  .form-section-header h3 {
    font-size: 16px;
  }
  
  .form-section-description {
    font-size: 13px;
  }
  
  .form-row {
    gap: 12px;
    margin-bottom: 12px;
  }
  
  .form-group input {
    padding: 12px 14px;
    min-height: 44px;
  }
  
  .form-group label {
    font-size: 13px;
    margin-bottom: 6px;
  }
}

/* Tablet styles */
@media (min-width: 769px) and (max-width: 1024px) {
  .instructor-contact-form {
    padding: 18px;
    margin: 14px 0;
  }
  
  .form-row {
    gap: 20px;
  }
  
  .form-group input {
    padding: 12px 14px;
    font-size: 15px;
    min-height: 46px;
  }
  
  .form-section-header h3 {
    font-size: 17px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .instructor-contact-form {
    border-color: #000;
  }
  
  .form-group input {
    border-color: #000;
  }
  
  .form-group input:focus {
    border-color: #0066cc;
    box-shadow: 0 0 0 2px #0066cc;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .form-group input {
    transition: none;
  }
}
.add-certification-page {
  max-width: 1200px;
  margin: 0 auto;
}

.page-header {
  text-align: center;
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-header p {
  font-size: 1.1rem;
  color: #6c757d;
  margin: 0;
}

.page-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-gap: 2rem;
  gap: 2rem;
  align-items: start;
}

.form-container {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.error-message {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  font-weight: 500;
}

.error-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.error-text {
  flex: 1 1;
}

.help-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.help-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.help-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.help-card ul {
  margin: 0;
  padding-left: 1.25rem;
  color: #6c757d;
}

.help-card li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.help-card li:last-child {
  margin-bottom: 0;
}

.help-card p {
  margin: 0;
  color: #6c757d;
  line-height: 1.6;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .page-header h1 {
    font-size: 2rem;
  }
  
  .page-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .form-container {
    padding: 1.5rem;
  }
  
  .help-card {
    padding: 1.25rem;
  }
  
  .help-card h3 {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .page-header h1 {
    font-size: 1.75rem;
  }
  
  .form-container,
  .help-card {
    padding: 1rem;
  }
  
  .error-message {
    padding: 0.75rem;
    gap: 0.5rem;
  }
}
.package-manager {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.package-manager-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e0e0e0;
}

.package-manager-header h2 {
  margin: 0;
  color: #333;
  font-size: 28px;
}

.package-manager-loading {
  text-align: center;
  padding: 40px;
  font-size: 18px;
  color: #666;
}

.error-message {
  background-color: #fee;
  border: 1px solid #fcc;
  color: #c33;
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.packages-list {
  display: grid;
  grid-gap: 20px;
  gap: 20px;
}

.package-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.2s ease;
}

.package-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.package-card.inactive {
  opacity: 0.7;
  background-color: #f9f9f9;
}

.package-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.package-header h3 {
  margin: 0;
  color: #333;
  font-size: 22px;
}

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

.package-details {
  display: grid;
  grid-gap: 15px;
  gap: 15px;
}

.package-description {
  color: #666;
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
}

.package-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 6px;
}

.package-price {
  font-size: 24px;
  color: #2c5aa0;
}

.package-price strong {
  font-weight: 700;
}

.billing-interval {
  font-size: 16px;
  color: #666;
  margin-left: 4px;
}

.package-limit {
  font-size: 18px;
  color: #333;
}

.package-features {
  margin-top: 10px;
}

.package-features h4 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 16px;
}

.package-features ul {
  margin: 0;
  padding-left: 20px;
}

.package-features li {
  margin-bottom: 5px;
  color: #555;
}

.package-meta {
  padding-top: 10px;
  border-top: 1px solid #eee;
  color: #888;
  font-size: 14px;
}

.no-packages {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-size: 18px;
  background-color: #f8f9fa;
  border-radius: 8px;
}

/* Package Form Styles */
.package-form-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.package-form {
  background: white;
  border-radius: 8px;
  padding: 30px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.package-form h3 {
  margin: 0 0 25px 0;
  color: #333;
  font-size: 24px;
  text-align: center;
}

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

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #2c5aa0;
  box-shadow: 0 0 0 2px rgba(44, 90, 160, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 15px;
  gap: 15px;
}

.features-section {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.features-section h4 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 18px;
}

.add-feature {
  display: grid;
  grid-template-columns: 2fr 1fr auto auto;
  grid-gap: 10px;
  gap: 10px;
  align-items: center;
  margin-bottom: 15px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 6px;
}

.add-feature input[type="text"],
.add-feature input[type="number"] {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.add-feature label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
}

.add-feature button {
  padding: 8px 15px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.add-feature button:hover {
  background-color: #218838;
}

.features-list {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.feature-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background-color: #f1f3f4;
  border-radius: 4px;
}

.feature-item .enabled {
  color: #28a745;
  font-weight: 600;
}

.feature-item .disabled {
  color: #dc3545;
  font-weight: 600;
}

.feature-item button {
  padding: 4px 8px;
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
}

.feature-item button:hover {
  background-color: #c82333;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

/* Button Styles */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: all 0.2s ease;
}

.btn-primary {
  background-color: #2c5aa0;
  color: white;
}

.btn-primary:hover {
  background-color: #1e3d6f;
}

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

.btn-secondary:hover {
  background-color: #545b62;
}

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

.btn-success:hover {
  background-color: #218838;
}

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

.btn-warning:hover {
  background-color: #e0a800;
}

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

.btn-danger:hover {
  background-color: #c82333;
}

/* Responsive Design */
@media (max-width: 768px) {
  .package-manager {
    padding: 15px;
  }
  
  .package-manager-header {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }
  
  .package-actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .package-info {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .add-feature {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .package-form {
    width: 95%;
    padding: 20px;
  }
}
.discount-code-manager {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.discount-code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e0e0e0;
}

.discount-code-header h2 {
  margin: 0;
  color: #333;
  font-size: 28px;
}

.filter-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  cursor: pointer;
}

.filter-controls input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.error-message {
  background-color: #fee;
  color: #c33;
  padding: 12px 16px;
  border-radius: 6px;
  border-left: 4px solid #c33;
  margin-bottom: 20px;
}

.success-message {
  background-color: #efe;
  color: #363;
  padding: 12px 16px;
  border-radius: 6px;
  border-left: 4px solid #363;
  margin-bottom: 20px;
}

.discount-code-form {
  background: #f9f9f9;
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 40px;
  border: 1px solid #e0e0e0;
}

.discount-code-form h3 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 6px;
  color: #555;
}

.form-group input,
.form-group select {
  padding: 10px 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-group input:invalid {
  border-color: #dc3545;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 25px;
}

.form-actions button {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-actions button[type="submit"] {
  background-color: #007bff;
  color: white;
}

.form-actions button[type="submit"]:hover:not(:disabled) {
  background-color: #0056b3;
}

.form-actions button[type="button"] {
  background-color: #6c757d;
  color: white;
}

.form-actions button[type="button"]:hover:not(:disabled) {
  background-color: #545b62;
}

.form-actions button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.discount-codes-list h3 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 20px;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #666;
  font-style: italic;
}

.no-codes {
  text-align: center;
  padding: 40px;
  color: #666;
  font-style: italic;
  background: #f9f9f9;
  border-radius: 8px;
}

.codes-table {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.codes-table table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.codes-table th {
  background-color: #f8f9fa;
  padding: 15px 12px;
  text-align: left;
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #e0e0e0;
}

.codes-table td {
  padding: 12px;
  border-bottom: 1px solid #e0e0e0;
  vertical-align: middle;
}

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

.codes-table tr.inactive {
  opacity: 0.6;
}

.code-cell {
  font-family: 'Courier New', monospace;
  font-weight: bold;
  color: #007bff;
}

.status {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.status.active {
  background-color: #d4edda;
  color: #155724;
}

.status.inactive {
  background-color: #f8d7da;
  color: #721c24;
}

.actions-cell {
  white-space: nowrap;
}

.actions-cell button {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 8px;
  transition: all 0.2s ease;
}

.edit-btn {
  background-color: #ffc107;
  color: #212529;
}

.edit-btn:hover:not(:disabled) {
  background-color: #e0a800;
}

.deactivate-btn {
  background-color: #dc3545;
  color: white;
}

.deactivate-btn:hover:not(:disabled) {
  background-color: #c82333;
}

.actions-cell button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Responsive design */
@media (max-width: 768px) {
  .discount-code-manager {
    padding: 15px;
  }
  
  .discount-code-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .codes-table {
    font-size: 14px;
  }
  
  .codes-table th,
  .codes-table td {
    padding: 8px 6px;
  }
  
  .actions-cell button {
    padding: 4px 8px;
    font-size: 11px;
    margin-right: 4px;
  }
}
.user-management {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.user-management-header {
  margin-bottom: 2rem;
}

.user-management-header h2 {
  color: #1a202c;
  font-size: 1.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.user-management-header p {
  color: #718096;
  font-size: 1rem;
}

.error-message {
  background-color: #fed7d7;
  border: 1px solid #feb2b2;
  color: #c53030;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

/* Search Section */
.search-section {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.search-section h3 {
  color: #2d3748;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.search-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.search-input {
  flex: 1 1;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: #3182ce;
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background-color: #3182ce;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background-color: #2c5aa0;
}

.btn-secondary {
  background-color: #e2e8f0;
  color: #4a5568;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #cbd5e0;
}

.btn-success {
  background-color: #38a169;
  color: white;
}

.btn-success:hover:not(:disabled) {
  background-color: #2f855a;
}

.btn-warning {
  background-color: #d69e2e;
  color: white;
}

.btn-warning:hover:not(:disabled) {
  background-color: #b7791f;
}

.btn-danger {
  background-color: #e53e3e;
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background-color: #c53030;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
}

/* Search Results */
.search-results {
  margin-top: 1.5rem;
}

.search-results h4 {
  color: #2d3748;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.users-table {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  overflow: hidden;
}

.table-header {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr 1.5fr 1fr 1fr;
  grid-gap: 1rem;
  gap: 1rem;
  background-color: #f7fafc;
  padding: 1rem;
  font-weight: 600;
  color: #4a5568;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table-row {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr 1.5fr 1fr 1fr;
  grid-gap: 1rem;
  gap: 1rem;
  padding: 1rem;
  border-top: 1px solid #e2e8f0;
  align-items: center;
}

.table-row:hover {
  background-color: #f7fafc;
}

.user-email {
  font-weight: 500;
  color: #2d3748;
}

.user-name {
  color: #4a5568;
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-badge.free {
  background-color: #e2e8f0;
  color: #4a5568;
}

.status-badge.active {
  background-color: #c6f6d5;
  color: #22543d;
}

.status-badge.past_due {
  background-color: #fed7d7;
  color: #c53030;
}

.status-badge.canceled {
  background-color: #e2e8f0;
  color: #718096;
}

.status-badge.incomplete {
  background-color: #feebc8;
  color: #c05621;
}

.package-name {
  color: #4a5568;
  font-size: 0.875rem;
}

.cert-count {
  font-weight: 600;
  color: #2d3748;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-content {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  max-height: 90vh;
  overflow-y: auto;
  width: 100%;
  max-width: 800px;
}

.user-details-modal {
  max-width: 900px;
}

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

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

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #718096;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

.modal-close:hover {
  color: #4a5568;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-top: 1px solid #e2e8f0;
  background-color: #f7fafc;
}

/* User Details Sections */
.user-info-section,
.subscription-section,
.admin-actions-section,
.payment-history-section,
.features-section {
  margin-bottom: 2rem;
}

.user-info-section h4,
.subscription-section h4,
.admin-actions-section h4,
.payment-history-section h4,
.features-section h4 {
  color: #2d3748;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 1rem;
  gap: 1rem;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.info-item label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-item span {
  color: #2d3748;
  font-weight: 500;
}

.user-id,
.stripe-id,
.stripe-sub-id {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.75rem;
  background-color: #f7fafc;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  border: 1px solid #e2e8f0;
}

.usage-display {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.usage-bar {
  width: 100%;
  height: 0.5rem;
  background-color: #e2e8f0;
  border-radius: 0.25rem;
  overflow: hidden;
}

.usage-fill {
  height: 100%;
  background-color: #3182ce;
  transition: width 0.3s ease;
}

.discount-code {
  background-color: #c6f6d5;
  color: #22543d;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-weight: 600;
  font-size: 0.875rem;
}

/* Admin Actions */
.action-group {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: #f7fafc;
  border-radius: 0.375rem;
  border: 1px solid #e2e8f0;
}

.action-group h5 {
  color: #2d3748;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.status-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.package-select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  font-size: 1rem;
  background-color: white;
}

.package-select:focus {
  outline: none;
  border-color: #3182ce;
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.investigation-tools {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Payment History */
.payment-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.payment-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  grid-gap: 1rem;
  gap: 1rem;
  padding: 0.75rem;
  background-color: #f7fafc;
  border-radius: 0.375rem;
  align-items: center;
}

.payment-date {
  color: #4a5568;
  font-size: 0.875rem;
}

.payment-amount {
  font-weight: 600;
  color: #2d3748;
}

.payment-status {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.payment-status.succeeded {
  background-color: #c6f6d5;
  color: #22543d;
}

.payment-status.failed {
  background-color: #fed7d7;
  color: #c53030;
}

.payment-status.pending {
  background-color: #feebc8;
  color: #c05621;
}

/* Features List */
.features-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.feature-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background-color: #f7fafc;
  border-radius: 0.375rem;
}

.feature-name {
  font-weight: 500;
  color: #2d3748;
}

.feature-status {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.feature-status.enabled {
  background-color: #c6f6d5;
  color: #22543d;
}

.feature-status.disabled {
  background-color: #e2e8f0;
  color: #718096;
}

.feature-limit {
  color: #718096;
  font-size: 0.875rem;
}

.updating-indicator {
  color: #3182ce;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .user-management {
    padding: 1rem;
  }
  
  .search-controls {
    flex-direction: column;
  }
  
  .table-header,
  .table-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .table-header > div,
  .table-row > div {
    padding: 0.25rem 0;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
  }
  
  .status-buttons,
  .investigation-tools {
    flex-direction: column;
  }
  
  .payment-item {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .modal-content {
    margin: 0.5rem;
    max-height: 95vh;
  }
}
.enhanced-analytics-dashboard {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.analytics-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.analytics-header h2 {
  margin: 0;
  color: #333;
  font-size: 28px;
  font-weight: 600;
}

.date-range-selector {
  display: flex;
  align-items: center;
  gap: 10px;
}

.date-range-selector label {
  font-weight: 500;
  color: #555;
}

.date-range-selector input[type="date"] {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.date-range-selector span {
  color: #666;
  font-weight: 500;
}

.enhanced-analytics-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 400px;
  font-size: 18px;
  color: #666;
}

.error-message {
  background-color: #fee;
  color: #c33;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 20px;
  border: 1px solid #fcc;
}

/* Tab Navigation */
.analytics-tabs {
  display: flex;
  border-bottom: 2px solid #e0e0e0;
  margin-bottom: 30px;
}

.tab {
  padding: 12px 24px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: #666;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
}

.tab:hover {
  color: #333;
  background-color: #f8f9fa;
}

.tab.active {
  color: #007bff;
  border-bottom-color: #007bff;
  background-color: #f8f9fa;
}

/* Tab Content */
.tab-content {
  min-height: 600px;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 30px;
}

.metric-card {
  background: white;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e0e0e0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.metric-card.realtime {
  border-left: 4px solid #28a745;
}

.metric-value {
  font-size: 32px;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
}

.metric-label {
  font-size: 14px;
  color: #666;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-change {
  font-size: 12px;
  color: #28a745;
  margin-top: 4px;
  font-weight: 500;
}

/* Charts Section */
.charts-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  grid-gap: 30px;
  gap: 30px;
  margin-top: 30px;
}

.chart-container {
  background: white;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e0e0e0;
}

.chart-container h4 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 18px;
  font-weight: 600;
}

/* Package Lists */
.packages-list,
.category-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.package-item,
.category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.package-rank {
  font-weight: 700;
  color: #007bff;
  min-width: 30px;
}

.package-name,
.category-name {
  flex: 1 1;
  font-weight: 500;
  color: #333;
}

.package-users,
.category-users,
.category-certs {
  font-size: 14px;
  color: #666;
  margin-left: 10px;
}

/* Revenue Tab */
.revenue-tab {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.revenue-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.revenue-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  grid-gap: 30px;
  gap: 30px;
}

.revenue-by-package,
.revenue-growth,
.churn-impact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.package-revenue-item,
.growth-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.churn-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e9ecef;
}

.churn-metric:last-child {
  border-bottom: none;
}

.churn-label {
  font-weight: 500;
  color: #333;
}

.churn-value {
  font-weight: 600;
  color: #dc3545;
}

/* Engagement Tab */
.engagement-tab {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.engagement-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.engagement-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  grid-gap: 30px;
  gap: 30px;
}

.activity-distribution,
.feature-usage,
.certification-trends {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-item,
.feature-item,
.trend-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.activity-level {
  text-transform: capitalize;
  font-weight: 500;
  color: #333;
  min-width: 80px;
}

.feature-name {
  flex: 1 1;
  font-weight: 500;
  color: #333;
}

/* Reports Tab */
.reports-tab {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.report-generation {
  background: white;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e0e0e0;
}

.report-generation h4 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 20px;
  font-weight: 600;
}

.report-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-gap: 30px;
  gap: 30px;
}

.report-type h5 {
  margin: 0 0 15px 0;
  color: #555;
  font-size: 16px;
  font-weight: 600;
}

.report-type {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.report-type button {
  margin-right: 10px;
}

.available-reports {
  background: white;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e0e0e0;
}

.available-reports h4 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 20px;
  font-weight: 600;
}

.reports-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.report-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.report-info {
  display: flex;
  gap: 20px;
  align-items: center;
  flex: 1 1;
}

.report-name {
  font-weight: 600;
  color: #333;
  min-width: 200px;
}

.report-type {
  color: #666;
  font-size: 14px;
  text-transform: capitalize;
  min-width: 150px;
}

.report-format {
  background: #007bff;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  min-width: 40px;
  text-align: center;
}

.report-date {
  color: #666;
  font-size: 14px;
  min-width: 120px;
}

.no-reports {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 40px;
}

/* Real-time Tab */
.realtime-tab {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.realtime-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.realtime-header h4 {
  margin: 0;
  color: #333;
  font-size: 24px;
  font-weight: 600;
}

.last-updated {
  color: #666;
  font-size: 14px;
  font-style: italic;
}

.realtime-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

/* Predictive Tab */
.predictive-tab {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.predictive-section {
  background: white;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e0e0e0;
}

.predictive-section h4 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 20px;
  font-weight: 600;
}

.churn-predictions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.churn-prediction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #fff5f5;
  border-radius: 6px;
  border: 1px solid #fed7d7;
}

.user-id {
  font-family: monospace;
  font-weight: 600;
  color: #333;
  min-width: 120px;
}

.churn-probability {
  font-weight: 700;
  color: #dc3545;
  min-width: 80px;
}

.risk-factors {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.risk-factor {
  background: #dc3545;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.no-predictions {
  text-align: center;
  color: #28a745;
  font-weight: 500;
  padding: 40px;
  background: #f0f8f0;
  border-radius: 6px;
}

.revenue-forecasts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.forecast-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #f0f8ff;
  border-radius: 6px;
  border: 1px solid #b3d9ff;
}

.forecast-month {
  font-weight: 500;
  color: #333;
  min-width: 100px;
}

.forecast-revenue {
  font-weight: 600;
  color: #007bff;
  min-width: 120px;
}

.forecast-confidence {
  color: #666;
  font-size: 14px;
}

.growth-projections {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.projection-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.projection-label {
  font-weight: 600;
  color: #333;
}

.projection-value {
  font-weight: 700;
  color: #28a745;
  font-size: 18px;
}

/* Button Styles */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: all 0.2s ease;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background-color: #007bff;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background-color: #0056b3;
}

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

.btn-secondary:hover:not(:disabled) {
  background-color: #545b62;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .enhanced-analytics-dashboard {
    padding: 15px;
  }
  
  .analytics-header {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }
  
  .date-range-selector {
    flex-wrap: wrap;
  }
  
  .analytics-tabs {
    overflow-x: auto;
    white-space: nowrap;
  }
  
  .tab {
    flex-shrink: 0;
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .charts-section,
  .revenue-charts,
  .engagement-charts {
    grid-template-columns: 1fr;
  }
  
  .report-buttons {
    grid-template-columns: 1fr;
  }
  
  .report-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .realtime-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .realtime-metrics {
    grid-template-columns: 1fr;
  }
  
  .metric-value {
    font-size: 24px;
  }
  
  .package-item,
  .category-item,
  .activity-item,
  .feature-item,
  .trend-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
/* Modern App Styles */
.App {
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
}

.App-header {
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.App-header h1 {
  margin: 0;
  color: #2d3748;
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.user-info span {
  font-size: 0.9rem;
  color: #4a5568;
  font-weight: 500;
}

.logout-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

main {
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Auth layout styles */
.auth-layout {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  flex-direction: column;
}

.auth-header {
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
}

.auth-header h1 {
  margin: 0;
  color: #2d3748;
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-main {
  flex: 1 1;
  padding: 2rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Loading state */
.app-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

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

.app-loading p {
  color: white;
  font-size: 1.1rem;
  margin: 0;
  font-weight: 500;
}

/* Responsive design */
@media (max-width: 768px) {
  .App-header {
    padding: 1rem;
  }
  
  .header-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .App-header h1 {
    font-size: 1.5rem;
  }
  
  .user-info {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  main {
    padding: 1rem 0.5rem;
  }
}

