/* static/css/style.css */

/* ============================================
   DESIGN SYSTEM - Color Variables & Typography
   ============================================ */
:root {
  /* Primary Colors */
  --color-primary: #2c3e50;
  --color-primary-light: #34495e;
  --color-primary-dark: #1a252f;

  /* Accent Colors */
  --color-accent: #3498db;
  --color-accent-light: #5dade2;
  --color-accent-dark: #2980b9;

  /* Semantic Colors */
  --color-success: #27ae60;
  --color-success-light: #2ecc71;
  --color-success-bg: #d4edda;
  --color-success-border: #c3e6cb;

  --color-danger: #e74c3c;
  --color-danger-light: #ec7063;
  --color-danger-bg: #f8d7da;
  --color-danger-border: #f5c6cb;

  --color-warning: #f39c12;
  --color-warning-light: #f1c40f;
  --color-warning-bg: #fff3cd;
  --color-warning-border: #ffeeba;

  --color-info: #17a2b8;
  --color-info-bg: #d1ecf1;
  --color-info-border: #bee5eb;

  /* Neutral Colors */
  --color-bg: #f5f6fa;
  --color-bg-dark: #ecf0f1;
  --color-white: #ffffff;
  --color-text: #2c3e50;
  --color-text-light: #7f8c8d;
  --color-text-muted: #95a5a6;
  --color-border: #dfe6e9;
  --color-border-light: #ecf0f1;

  /* Special Colors (for charts/clusters) */
  --cluster-0-color: #3498db;
  --cluster-1-color: #e74c3c;
  --cluster-2-color: #2ecc71;
  --cluster-3-color: #f39c12;
  --cluster-4-color: #9b59b6;

  /* SpinWeb Brand Color */
  --color-spinweb: #ff6b35;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;

  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* ============================================
   BASE STYLES
   ============================================ */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--color-bg);
    color: var(--color-text);
    padding-top: 10px;
}

/* Irrelevant certifications styling */
.irrelevant-cert {
    position: relative;
    background: linear-gradient(90deg, rgba(255,0,0,0.12), rgba(255,0,0,0.04));
}
.irrelevant-cert td {
    opacity: 0.85;
}
.irrelevant-cert td:first-child::before {
    content: "IRR";
    font-size: 10px;
    color: #fff;
    background: #c00;
    padding: 2px 4px;
    border-radius: 3px;
    margin-right: 6px;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-lg);
}

h1 {
    color: var(--color-text);
    text-align: center;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    font-weight: 600;
}

h2 {
    color: var(--color-text);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

h3 {
    color: var(--color-text);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

/* ============================================
   FLASH MESSAGES
   ============================================ */
.flash-messages {
    margin-bottom: var(--spacing-lg);
}

.message {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    font-size: 0.9rem;
}

.message.error, .message.danger {
    background: var(--color-danger-bg);
    border: 1px solid var(--color-danger-border);
    color: #721c24;
}

.message.success {
    background: var(--color-success-bg);
    border: 1px solid var(--color-success-border);
    color: #155724;
}

.message.warning {
    background: var(--color-warning-bg);
    border: 1px solid var(--color-warning-border);
    color: #856404;
}

.message.info {
    background: var(--color-info-bg);
    border: 1px solid var(--color-info-border);
    color: #0c5460;
}

/* Default style for backward compatibility */
.message:not(.error):not(.success):not(.warning):not(.info):not(.danger) {
    background: var(--color-info-bg);
    border: 1px solid var(--color-info-border);
    color: #0c5460;
}

/* ============================================
   CARDS & SECTIONS
   ============================================ */
.content-section, .result-section, .upload-form {
    background: var(--color-white);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* ============================================
   QUICK ACTIONS (Home Page)
   ============================================ */
.quick-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.quick-action-btn {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.quick-action-btn:hover {
    background-color: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quick-action-btn.btn-accent {
    background-color: var(--color-accent);
}

.quick-action-btn.btn-accent:hover {
    background-color: var(--color-accent-dark);
}

/* ============================================
   STATS CARDS (Home Page)
   ============================================ */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--spacing-lg);
}

.stat-card {
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-lg);
    text-align: center;
    transition: var(--transition-normal);
    border-left: 4px solid var(--color-accent);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-card h3 {
    color: var(--color-text-light);
    margin: 0 0 var(--spacing-sm) 0;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-icon {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-accent);
    margin: var(--spacing-sm) 0;
    line-height: 1;
}

.stat-number-success { color: var(--color-success); }
.stat-number-primary { color: var(--color-primary); }
.stat-number-accent { color: var(--color-accent); }
.stat-number-warning { color: var(--color-warning); }
.stat-number-danger { color: var(--color-danger); }

.stat-description {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin: 0;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

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

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

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

.btn-danger {
    background-color: var(--color-danger);
    color: var(--color-white);
}

.btn-danger:hover {
    background-color: var(--color-danger-light);
}

.btn-secondary {
    background-color: var(--color-text-muted);
    color: var(--color-white);
}

.btn-secondary:hover {
    background-color: var(--color-text-light);
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn:disabled {
    background-color: var(--color-border);
    color: var(--color-text-muted);
    cursor: not-allowed;
    opacity: 0.7;
}

/* ============================================
   ADMIN GRID (Maintenance Page)
   ============================================ */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.admin-card h2 {
    color: var(--color-primary);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--color-accent);
}

.admin-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-links li {
    margin-bottom: var(--spacing-sm);
}

.admin-links a {
    color: var(--color-text);
    text-decoration: none;
    padding: var(--spacing-sm) var(--spacing-md);
    display: block;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.admin-links a:hover {
    background-color: var(--color-bg);
    color: var(--color-accent);
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

.alert-info {
    background-color: var(--color-info-bg);
    border: 1px solid var(--color-info-border);
    color: #0c5460;
}

.alert-success {
    background-color: var(--color-success-bg);
    border: 1px solid var(--color-success-border);
    color: #155724;
}

.alert-warning {
    background-color: var(--color-warning-bg);
    border: 1px solid var(--color-warning-border);
    color: #856404;
}

.alert-danger {
    background-color: var(--color-danger-bg);
    border: 1px solid var(--color-danger-border);
    color: #721c24;
}

/* ============================================
   CANDIDATE NAV
   ============================================ */
.candidate-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.sync-section {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--color-border);
}

/* Filter panel styles */
.filters-wrapper {
    background: #ffffff;
    padding: 12px 16px 14px 16px;
    margin: 15px 0 25px 0;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.filters-wrapper.collapsed form { display:none; }
.filters-wrapper.collapsed { padding-bottom:8px; }
.filters-wrapper.collapsed #filtersInlineNote { display:none!important; }
.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
}
.filters-grid { display:grid; grid-template-columns: 1fr 1fr; gap:14px; width:100%; }
.filters-col { display:flex; flex-direction:column; gap:6px; }
.filters-col h4 { margin:4px 0 2px 0; font-size:13px; text-transform:uppercase; letter-spacing:0.5px; color:#555; }
.filters-row .select2-container { min-width: 200px; }
.filters-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.saved-filters-group { display: flex; gap: 6px; align-items: center; }
.filter-hint { color:#555; font-size: 12px; line-height: 1.4; max-width: 260px; }
.inline-note.success { background:#d4edda; border:1px solid #c3e6cb; color:#155724; }
.inline-note.error { background:#f8d7da; border:1px solid #f5c6cb; color:#721c24; }
.inline-note { padding:6px 10px; border-radius:4px; font-size:13px; animation: fade-slide 0.4s ease; }
@keyframes fade-slide { from {opacity:0; transform:translateY(-4px);} to {opacity:1; transform:translateY(0);} }
.or-highlight { box-shadow: inset 0 0 0 3px #ffd54f; }

/* Help tooltip */
.filter-help { position:relative; display:inline-block; }
.filter-help button { background:#777; border:none; color:#fff; border-radius:50%; width:22px; height:22px; line-height:22px; padding:0; cursor:pointer; font-weight:bold; }
.filter-help button:hover { background:#555; }
.filter-help .help-pop { position:absolute; top:28px; right:0; background:#fff; border:1px solid #ccc; box-shadow:0 4px 12px rgba(0,0,0,0.15); padding:10px 12px; width:320px; z-index:30; font-size:12px; line-height:1.4; border-radius:6px; display:none; }
.filter-help .help-pop.visible { display:block; animation: fade-slide 0.25s ease; }
.filter-legend { font-size:11px; color:#666; margin-top:4px; }

.cert-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.9em;
}

.cert-table th, .cert-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.cert-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.cert-table tr:hover {
    background-color: #f1f1f1;
}

.cert-table .cert-count {
    text-align: center;
    font-weight: bold;
}

.cert-table a {
    color: #0066cc;
    text-decoration: none;
}

.cert-table a:hover {
    text-decoration: underline;
}

.form-section {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.upload-options {
    margin-bottom: 20px;
}

.option-section {
    margin-top: 15px;
    padding-left: 20px;
}

.hidden {
    display: none;
}

textarea {
    width: 100%;
    min-height: 300px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
}

.file-input-section {
    margin-bottom: 15px;
}

.toggle-container {
    display: flex;
    border-radius: 5px;
    margin: 15px 0;
    overflow: hidden;
    border: 1px solid #ddd;
    background-color: #f5f5f5;
}

.toggle-option {
    flex: 1;
    text-align: center;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.toggle-option:first-child {
    border-right: 1px solid #ddd;
}

.toggle-option .icon {
    font-size: 24px;
    display: block;
}

.toggle-option.active {
    background-color: #007bff;
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.toggle-option:hover:not(.active) {
    background-color: #e0e0e0;
}

/* Dashboard Styles */
.dashboard-summary {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.summary-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    text-align: center;
    min-width: 200px;
}

.big-number {
    font-size: 2.5em;
    font-weight: bold;
    margin: 10px 0;
    color: #007bff;
}

.dashboard-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.dashboard-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    flex: 1;
    min-width: 300px;
}

.dashboard-card.full-width {
    width: 100%;
    flex-basis: 100%;
}

.chart-legend {
    margin-top: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

/* Add these styles for the co-occurrence chart */

.chart-description {
    text-align: center;
    margin-bottom: 20px;
    color: #666;
    font-style: italic;
}

.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
    margin-bottom: 30px;
}

.cooccurrence-legend {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 20px 0;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,0.1);
}

/* Ensure the chart is responsive */
@media (max-width: 768px) {
    .chart-container {
        height: 300px;
    }
    
    .cooccurrence-legend {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dashboard-row {
        flex-direction: column;
    }
    
    .dashboard-card {
        width: 100%;
    }
}
/* ============================================
   MODALS (Consolidated)
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: rgba(0,0,0,0.5);
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
    overflow: auto;
}

.modal.open {
    display: flex;
}

body.modal-open {
    overflow: hidden;
}

.modal-content {
    position: relative;
    background-color: var(--color-white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 1000px;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    align-items: center;
    padding-bottom: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--color-border);
    padding-right: 50px;
}

.modal-header h2 {
    margin: 0;
}

.close-modal,
.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: var(--transition-fast);
    line-height: 1;
}

.close-modal:hover,
.modal-close:hover {
    color: var(--color-text);
}

@media (max-width: 600px) {
    .modal-header {
        flex-direction: column;
        align-items: stretch;
    }
    .modal-content {
        width: 95%;
        padding: var(--spacing-md);
    }
}

/* Modal detail sections */
.detail-section {
    margin-bottom: var(--spacing-lg);
}

.detail-section h3 {
    margin: 0 0 var(--spacing-sm);
    font-size: 0.95rem;
    border-bottom: 1px solid var(--color-border-light);
    padding-bottom: var(--spacing-xs);
}

.detail-section-body pre.prewrap {
    white-space: pre-wrap;
    background: var(--color-bg);
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-sm);
    max-height: 260px;
    overflow: auto;
}

.highlight-search {
    background: #ffe58a;
    padding: 1px 2px;
    border-radius: 3px;
}

.edu-toggle {
    background: var(--color-border);
    border: none;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.75rem;
}

.edu-toggle.active {
    background: var(--color-success);
    color: var(--color-white);
}

.btn-mini {
    font-size: 0.75rem;
    padding: 4px 8px;
}

/* Add styles for the filtered requests table */
.table-responsive {
    overflow-x: auto;
    margin-top: 15px;
}

.requests-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.95em;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.requests-table th, 
.requests-table td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #ddd;
}

.requests-table th {
    background-color: #4a89dc;
    color: #ffffff;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #3a70b9;
}

.requests-table tr:nth-child(even) {
    background-color: #f8f8f8;
}

.requests-table tr:hover {
    background-color: #f1f1f1;
}

.requests-table td:not(:last-child) {
    border-right: 1px solid #e0e0e0;
}

.requests-table .btn-small {
    padding: 5px 10px;
    font-size: 0.85em;
    margin-top: 0;
}

.filter-info {
    color: #666;
    font-style: italic;
    margin-top: 5px;
    font-size: 0.9em;
}
.cluster-container {
    margin-bottom: 40px;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    background-color: #f9f9f9;
}

.cluster-title {
    font-size: 1.4em;
    margin-bottom: 15px;
    color: #333;
}

.cert-badge {
    display: inline-block;
    background-color: #4b96c2;
    color: white;
    padding: 8px 12px;
    margin: 5px;
    border-radius: 15px;
    font-weight: bold;
}

.cert-badge .count {
    display: inline-block;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    text-align: center;
    line-height: 24px;
    margin-left: 8px;
}

.network-container {
    width: 100%;
    height: 600px;
    border: 1px solid #ddd;
    margin-bottom: 30px;
    background-color: white;
}

.node circle {
    fill: var(--cluster-0-color);
    stroke: #fff;
    stroke-width: 2px;
}

.link {
    stroke: #999;
    stroke-opacity: 0.6;
}

.cluster-0 circle { fill: var(--cluster-0-color); }
.cluster-1 circle { fill: var(--cluster-1-color); }
.cluster-2 circle { fill: var(--cluster-2-color); }
.cluster-3 circle { fill: var(--cluster-3-color); }
.cluster-4 circle { fill: var(--cluster-4-color); }

.link.cluster-0 { stroke: var(--cluster-0-color); }
.link.cluster-1 { stroke: var(--cluster-1-color); }
.link.cluster-2 { stroke: var(--cluster-2-color); }
.link.cluster-3 { stroke: var(--cluster-3-color); }
.link.cluster-4 { stroke: var(--cluster-4-color); }

.action-buttons {
    margin-top: 30px;
    text-align: center;
}

/* Error details table styles */
.error-details {
    background: #fff;
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.error-details h3 {
    color: #d9534f;
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.error-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.error-table th, .error-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.error-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.error-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.error-table tr:hover {
    background-color: #f1f1f1;
}
.request-row-highlight {
    background-color: #fffacd; /* Light yellow background */
    animation: highlightFade 5s;
    border-left: 4px solid #ffd700; /* Gold left border */
}

@keyframes highlightFade {
    from { background-color: #ffffe0; }
    to { background-color: #fffacd; }
}

.new-badge {
    display: inline-block;
    background-color: #28a745;
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
    animation: pulsate 2s infinite;
}

@keyframes pulsate {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.sortable {
    cursor: pointer;
    position: relative;
}
.sortable:after {
    content: '↕️';
    font-size: 0.8em;
    margin-left: 5px;
    opacity: 0.5;
}
.sortable.asc:after {
    content: '↑';
    opacity: 1;
}
.sortable.desc:after {
    content: '↓';
    opacity: 1;
}
.new-request {
    background-color: #fffde7;
    animation: highlight 2s ease-in-out;
}
@keyframes highlight {
    0% { background-color: #ffeb3b; }
    100% { background-color: #fffde7; }
}

/* ============================================
   NAVBAR STYLES
   ============================================ */
.navbar {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.navbar-logo a {
    color: var(--color-white);
    font-size: 1.25rem;
    text-decoration: none;
    font-weight: 700;
    padding: 14px 0;
    display: block;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.navbar-links > a,
.navbar-links .nav-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 14px 16px;
    border-radius: 0;
    transition: var(--transition-fast);
    font-weight: 500;
    font-size: 0.9rem;
}

.navbar-links > a:hover,
.navbar-links .nav-link:hover {
    color: var(--color-white);
    background-color: rgba(255, 255, 255, 0.1);
}

/* Nav dropdown menu styling */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-title {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: var(--transition-fast);
    font-weight: 500;
    font-size: 0.9rem;
}

.nav-dropdown-title:after {
    content: '▾';
    font-size: 12px;
    margin-left: 6px;
    opacity: 0.7;
}

.nav-dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--color-white);
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: var(--spacing-sm) 0;
    z-index: 1000;
    display: none;
    border-top: 3px solid var(--color-accent);
}

.nav-dropdown:hover .nav-dropdown-content {
    display: block;
}

.nav-dropdown:hover .nav-dropdown-title {
    color: var(--color-white);
    background-color: rgba(255, 255, 255, 0.1);
}

/* Dropdown sections and labels */
.dropdown-section {
    padding: var(--spacing-xs) 0;
}

.dropdown-label {
    display: block;
    padding: 6px 16px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--color-border-light);
    margin: var(--spacing-xs) 0;
}

.nav-dropdown-content a {
    color: var(--color-text);
    padding: 8px 16px 8px 24px;
    display: block;
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.nav-dropdown-content a:hover {
    background-color: var(--color-bg);
    color: var(--color-accent);
}

/* User dropdown menu styling */
.user-menu {
    position: relative;
    display: inline-block;
    margin-left: var(--spacing-md);
}

.user-welcome {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    color: var(--color-white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.user-welcome:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.user-welcome:after {
    content: '▾';
    font-size: 12px;
    margin-left: 8px;
    opacity: 0.7;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background-color: var(--color-white);
    min-width: 160px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) 0;
    z-index: 1000;
    display: none;
    border-top: 3px solid var(--color-accent);
}

.user-menu:hover .user-dropdown {
    display: block;
}

.user-dropdown a {
    color: var(--color-text);
    padding: 10px 16px;
    display: block;
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.user-dropdown a:hover {
    background-color: #f5f5f5;
    color: #2c3e50;
}

/* Collapsible section styles */
.collapsible {
    margin-bottom: 20px;
}

.section-header {
    cursor: pointer;
    user-select: none;
}

.section-header:hover {
    background-color: #f0f0f0;
}

.toggle-btn {
    transition: transform 0.3s ease;
}

.collapsed .toggle-btn {
    transform: rotate(-90deg);
}

.section-content {
    transition: max-height 0.3s ease-out;
    overflow: hidden;
}

.collapsed .section-content {
    max-height: 0;
    overflow: hidden;
}

/* Data page specific styles */
.filter-options {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.data-table th, .data-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.data-table th {
    background-color: #f2f2f2;
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover, .clickable-consolidated-row:hover {
    background-color: #f5f5f5;
}

/* Toggle button styles */
.toggle-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.view-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.toggle-label {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    background-color: #f5f5f5;
    transition: all 0.2s ease;
}

.toggle-label.active {
    background-color: #4a89dc;
    color: white;
}

.toggle-label input {
    margin-right: 5px;
}

.consolidated-badge {
    display: inline-block;
    font-size: 0.75em;
    background-color: #4a89dc;
    color: white;
    border-radius: 3px;
    padding: 2px 5px;
    margin-left: 8px;
}

.consolidated-title-row {
    background-color: #f9f9ff;
}

/* Consolidated title description cell */
#consolidatedTitlesSummary td:nth-child(2) {
    max-width: 400px;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Data actions styles */
.data-actions {
    margin-left: auto;
    display: flex;
}

/* Consolidation modal styles */
.progress-container {
    text-align: center;
    padding: 20px;
}

.progress-bar {
    width: 100%;
    background-color: #f0f0f0;
    border-radius: 4px;
    height: 20px;
    margin-top: 15px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    background-color: #4a89dc;
    height: 100%;
    width: 0;
    animation: progress-animation 1.5s infinite;
}

@keyframes progress-animation {
    0% { width: 0%; }
    50% { width: 75%; }
    100% { width: 0%; }
}

/* Pagination styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 15px;
}

.pagination-info {
    padding: 5px 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
    color: #333;
}

.pagination .btn {
    margin-top: 0;
}

/* Summary section styles */
.summary-section {
    background-color: #f9f9f9;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    border-left: 4px solid #4a89dc;
}

.summary-section p {
    margin: 0;
}

.summary-section strong {
    color: #4a89dc;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: capitalize;
}

.status-unprocessed {
    background-color: #ffc107;
    color: #212529;
}

.status-processed {
    background-color: #28a745;
    color: white;

}

.status-irrelevant {
    background-color: #6c757d;
    color: white;
}

.status-failed {
    background-color: #dc3545;
    color: white;
}

/* Filter controls */
.filter-controls {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 15px;
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
}

.status-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-filter select {
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* Filter controls with search */
.filter-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
}

.status-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-filter select {
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.search-filter {
    display: flex;
    align-items: center;
}

.search-filter input[type="text"] {
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    margin-right: 5px;
    width: 200px;
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.85em;
    margin-top: 0;
}

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

.btn-clear:hover {
    background-color: #5a6268;
}

/* Action controls */
.action-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

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

/* Row highlighting based on status */
tr.status-unprocessed {
    background-color: rgba(40, 167, 69, 0.1);
    color: #1976c7;
}

/* Row highlighting based on status */
tr.status-processed {
    background-color: rgba(40, 167, 69, 0.1);
}

tr.status-irrelevant {
    background-color: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

tr.status-failed {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Checkbox column */
.select-column {
    width: 40px;
    text-align: center;
}

.suggested-certifications {
    background-color: #fff8e1;
    border-left: 4px solid #ffc107;
}

.suggestion-note {
    font-style: italic;
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
}

/* Certification type selection styles */
.certification-controls {
    margin-bottom: 20px;
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 5px;
}

.cert-type-selection {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.checkbox-group {
    display: flex;
    gap: 10px;
}

.cert-type-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.cert-type-checkbox input {
    margin-right: 5px;
}

/* Certification type styling in table */
.cert-type-required td:nth-child(3) {
    color: #e74c3c;
    font-weight: bold;
}

.cert-type-optional td:nth-child(3) {
    color: #3498db;
    font-style: italic;
}

.cert-type-suggested td:nth-child(3) {
    color: #2ecc71;
    font-style: italic;
}

/* All Requests Page Specific Styles */
/* Styles for consolidated title dropdowns */
.select-container {
    position: relative;
    min-height: 24px;
}

.current-title {
    cursor: pointer;
    padding: 2px 5px;
    display: inline-block;
    border-radius: 3px;
    background-color: #f5f5f5;
    transition: background-color 0.2s;
}

.current-title:hover {
    background-color: #e0e0e0;
}

/* CSS for the toggle switch for showing hidden requests */
.view-toggle {
    display: inline-flex;
    align-items: center;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
    margin-right: 10px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #2196F3;
}

input:checked + .toggle-slider:before {
    transform: translateX(30px);
}

.toggle-label {
    font-size: 14px;
    font-weight: bold;
}

/* Hidden request styling */
.hidden-request {
    background-color: rgba(0, 0, 0, 0.05);
    color: #777;
}

.hidden-request td {
    text-decoration: line-through;
    opacity: 0.7;
}

.hidden-request td:last-child,
.hidden-request td:last-child .btn {
    text-decoration: none;
}

/* Expand action buttons cell to fit both buttons */
.action-buttons-cell {
    min-width: 130px;
    white-space: nowrap;
}

/* Transition effect for row removal */
tr {
    transition: opacity 0.5s ease;
}

/* Search styles */
.search-container {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.search-form {
    display: flex;
    width: 100%;
    max-width: 600px;
}

.search-input {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

.search-btn {
    border-radius: 0 4px 4px 0;
    margin-top: 0;
    margin-left: -1px;
}

.btn-clear {
    margin-top: 0;
    margin-left: 10px;
    background-color: #6c757d;
}

.btn-clear:hover {
    background-color: #5a6268;
}

/* Pagination styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.pagination-btn {
    margin: 0;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.page-info {
    padding: 5px 10px;
    background: #f5f5f5;
    border-radius: 4px;
}

.per-page-selector {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.per-page-selector label {
    margin-right: 5px;
}

.per-page-selector select {
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.pagination-summary {
    margin-bottom: 15px;
    color: #666;
    font-style: italic;
}

.select-container.loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.7);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px;
    z-index: 10;
}

.select-container.update-success {
    background-color: rgba(76, 175, 80, 0.1);
    transition: background-color 0.5s;
}

/* Make sure the select element takes full width */
.consolidated-title-select {
    width: 100%;
}

/* Fix for Select2 dropdown width */
.select2-container {
    width: 100% !important;
}

/* Style for hide button */
.btn-hide {
    background-color: #f44336;
}

.btn-hide:hover {
    background-color: #d32f2f;
}

/* Style for show button */
.btn-show {
    background-color: #4CAF50;
}

.btn-show:hover {
    background-color: #388E3C;
}

/* Improved layout for top action buttons and toggle */
.top-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

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

.top-actions-right {
    display: flex;
    align-items: center;
}

/* Updated toggle styles to prevent layout issues */
.view-toggle {
    margin-left: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.toggle-inner {
    display: flex;
    align-items: center;
}

/* Make sure the toggle doesn't wrap or get pushed in front of other elements */
@media (max-width: 768px) {
    .top-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .view-toggle {
        margin-left: 0;
    }
}

/* Processing progress styles */
.progress-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
    margin: 20px 0;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: bold;
}

.progress-percent {
    color: #4a89dc;
}

.progress-bar-container {
    height: 25px;
    background-color: #f0f0f0;
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #4a89dc;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.stat-item {
    padding: 10px 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-label {
    font-weight: bold;
    margin-right: 5px;
}

.stat-value {
    color: #4a89dc;
    font-weight: bold;
}

.error-message {
    padding: 10px;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    margin-bottom: 20px;
}

.progress-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Active job notification banner */
.active-job-notification {
    background-color: #e3f2fd;
    border-left: 4px solid #2196F3;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    animation: pulse-light-blue 2s infinite;
}

/* SpinWeb scraping job styling */
.active-job-notification.spinweb-job {
    background-color: #fff3e0;
    border-left: 4px solid #ff6b35;
    animation: pulse-light-orange 2s infinite;
}

.active-job-notification p {
    margin: 0;
    flex-grow: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.job-icon {
    font-size: 1.3em;
    animation: spin 2s linear infinite;
}

.btn-job {
    background-color: #2196F3;
}

.btn-job:hover {
    background-color: #0b7dda;
}

.btn-job.spinweb-btn {
    background-color: #ff6b35;
}

.btn-job.spinweb-btn:hover {
    background-color: #e55a2b;
}

@keyframes pulse-light-blue {
    0% { box-shadow: 0 0 0 0 rgba(33, 150, 243, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(33, 150, 243, 0); }
    100% { box-shadow: 0 0 0 0 rgba(33, 150, 243, 0); }
}

@keyframes pulse-light-orange {
    0% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 107, 53, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0); }
}

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

/* Original text formatting styles */
.original-text {
    margin-top: 10px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.formatted-text {
    white-space: pre-wrap;
    word-wrap: break-word;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
    max-width: 100%;
    color: #333;
}

.auth-container {
    max-width: 400px;
    margin: 100px auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    margin-bottom: 10px;
    color: #333;
}

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

.auth-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.auth-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 16px;
}

.auth-form .checkbox-group {
    display: flex;
    align-items: center;
}

.auth-form .checkbox-group input {
    width: auto;
    margin-right: 10px;
}

.auth-form .btn {
    width: 100%;
    padding: 12px;
    background-color: #4a6fdc;
    color: white;
    border: none;
    border-radius: 3px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.auth-form .btn:hover {
    background-color: #3a5bbf;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.auth-footer a {
    color: #4a6fdc;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.flash-messages {
    margin-bottom: 20px;
}

.message {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 3px;
    color: #fff;
}

.message.error {
    background-color: #f44336;
}

.message.success {
    background-color: #4CAF50;
}

.message.info {
    background-color: #2196F3;
}

.message.warning {
    background-color: #ff9800;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.edit-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-actions {
    margin-top: 20px;
    text-align: right;
}

.form-actions .btn {
    margin-left: 10px;
}

.loading-message {
    text-align: center;
    padding: 20px;
    color: #666;
}

.error {
    color: #e74c3c;
    padding: 10px;
    background-color: #fadbd8;
    border-radius: 4px;
    text-align: center;
}

/* Profile page styles */
.profile-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.profile-section {
    background-color: #fff;
    padding: 25px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 16px;
}

.btn-primary {
    background-color: #4a6fdc;
    color: white;
}

.btn-primary:hover {
    background-color: #3a5bbf;
}

.btn-disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-disabled:hover {
    background-color: #ccc;
    color: #666;
}

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

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

.errors span {
    color: #f44336;
    font-size: 14px;
    display: block;
    margin-top: 5px;
}

@media (min-width: 768px) {
    .profile-container {
        flex-direction: row;
    }
    
    .profile-section {
        flex: 1;
    }
}

/* Certification Management Page Styles */
.cert-search-container {
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cert-search-input {
    flex-grow: 1;
    max-width: 400px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.merge-select-container {
    width: 100%;
    position: relative;
}

.merge-select {
    width: 100%;
}

.cert-badge {
    display: inline-block;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 0.8em;
    color: white;
    margin-right: 5px;
}

.cert-required {
    background-color: #e74c3c;
}

.cert-optional {
    background-color: #3498db;
}

.cert-suggested {
    background-color: #2ecc71;
}

.loading-indicator {
    display: none;
    margin-left: 10px;
}

.loading-indicator::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    border-top-color: #007bff;
    animation: spin 1s ease-in-out infinite;
}

.total-count-badge {
    background-color: #6c757d;
    color: white;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.9em;
}

.certification-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.certification-table th,
.certification-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.certification-table th {
    background-color: #f5f5f5;
    font-weight: bold;
    cursor: pointer;
}

.certification-table tr:hover {
    background-color: #f9f9f9;
}

.certification-table .center {
    text-align: center;
}

.actions-column {
    width: 200px;
}

.warning-text {
    color: #e74c3c;
    background-color: #fadbd8;
    padding: 10px;
    border-radius: 4px;
    font-weight: bold;
    margin-bottom: 20px;
}

/* Certification details modal styles */
.cert-name {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 5px;
}

.cert-description {
    margin-bottom: 20px;
    font-style: italic;
    color: #666;
}

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

.requests-group h3 {
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.requests-count {
    display: inline-block;
    background-color: #6c757d;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.8em;
    margin-left: 5px;
}

.clickable-cert {
    cursor: pointer;
    text-decoration: underline;
    color: #007bff;
}

.clickable-cert:hover {
    color: #0056b3;
}

.no-requests {
    font-style: italic;
    color: #999;
    padding: 10px 0;
}

/* Styles for clickable requests */
.requests-table tbody tr {
    cursor: pointer;
}

.requests-table tbody tr:hover {
    background-color: #f5f5f5;
}

.clickable-request {
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
}

.clickable-request:hover {
    color: #0056b3;
}

/* Description field styling */
.desc-cell {
    display: flex;
    align-items: flex-start;
}

.desc-display {
    flex-grow: 1;
    cursor: pointer;
    min-height: 1.2em;
}

.editable textarea.edit-input {
    width: 100%;
    min-height: 60px;
    resize: vertical;
    padding: 4px;
    margin-bottom: 4px;
    border: 1px solid #ccc;
    border-radius: 3px;
}



.pagination-container {
    margin: 20px 0;
    text-align: center;
}
.pagination {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    border-radius: 4px;
    overflow: hidden;
}
.pagination li {
    display: inline-block;
}
.pagination li a, .pagination li span {
    display: block;
    padding: 8px 16px;
    text-decoration: none;
    color: #333;
    background-color: #f4f4f4;
    border: 1px solid #ddd;
    margin-left: -1px;
}
.pagination li.active a {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}
.pagination li a:hover:not(.active) {
    background-color: #ddd;
}
.pagination li.disabled span {
    color: #999;
    background-color: #f9f9f9;
    cursor: not-allowed;
}
.pagination-info {
    margin-top: 10px;
    color: #666;
    font-size: 0.9em;
}
.per-page-select {
    margin-left: 10px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Add styles for clickable count badges */
.cert-badge {
    cursor: pointer;
    transition: transform 0.1s ease-in-out;
}

.cert-badge:hover {
    transform: scale(1.1);
}

/* Make the whole count cell clickable */
td.center {
    cursor: pointer;
}

/* Add styling for the total badge */
.cert-badge.cert-total {
    background-color: rgba(52, 73, 94, 0.2);
    color: #34495e;
}

.cert-badge.cert-total:hover {
    background-color: rgba(52, 73, 94, 0.3);
}

/* Type label for the total certification type */
.cert-type-total {
    background-color: rgba(52, 73, 94, 0.2);
    color: #34495e;
}

/* Editable field styles */
.editable .display-value {
    cursor: pointer;
    padding: 2px 4px;
}

.editable .display-value:hover {
    background-color: #f0f0f0;
    border-radius: 3px;
}

.editable .edit-form {
    padding: 2px 0;
}

.editable .edit-input {
    width: 100%;
    padding: 4px;
    margin-bottom: 4px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.editable .edit-controls {
    display: flex;
    gap: 4px;
}

.update-success {
    animation: flash-success 1.5s;
}

@keyframes flash-success {
    0% { background-color: transparent; }
    30% { background-color: rgba(76, 175, 80, 0.2); }
    70% { background-color: rgba(76, 175, 80, 0.2); }
    100% { background-color: transparent; }
}

.abbr-cell {
    display: flex;
    align-items: center;
}

.abbr-display {
    flex-grow: 1;
    cursor: pointer;
}

.edit-icon {
    color: #888;
    cursor: pointer;
    margin-left: 8px;
    font-size: 14px;
}

.edit-icon:hover {
    color: #333;
}

/* Toggle switch for irrelevant certifications */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #e74c3c;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Enhanced irrelevant cert styling */
.irrelevant-cert td {
    color: #999;
    text-decoration: line-through;
}

.irrelevant-cert .cert-badge {
    opacity: 0.6;
}

.irrelevant-cert:hover td {
    color: #777;
}