/**
 * Sentinel Admin SCSS
 * Main stylesheet for Sentinel WordPress plugin admin interface
 * Compiled by Prepros to ../css/sentinel-admin.css
 */

// Import base components (create these as needed)
// @import 'components/base';
// @import 'components/forms';
// @import 'components/badges';

/* autoprefixer: off */
/* Premium Plan Badge Styles */
.sentinel-badge-free {
  background: #f0f0f0;
  color: #666;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
}

.sentinel-badge-premium {
  background: #0073aa;
  color: white;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
}

/* Premium Feature Styling */
.sentinel-premium-badge {
  background: #ffc107;
  color: #333;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: bold;
  margin-left: 5px;
  text-transform: uppercase;
}

.sentinel-premium-preview {
  position: relative;
  margin-left: 20px;
  margin-top: 10px;

  &::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    pointer-events: none;
    z-index: 1;
  }

  textarea {
    width: 100%;
    max-width: 500px;
  }

  small {
    display: block;
    margin-top: 5px;
    color: #666;
  }
}

/* Disabled premium options styling */
input[disabled] + .sentinel-premium-badge {
  opacity: 0.7;
}

label:has(input[disabled]) {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Segmented Toggle (3-way toggle) */
.sentinel-segmented-toggle {
  position: relative;
  display: inline-flex;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 4px;
  border: 1px solid #e2e8f0;
  margin-bottom: 8px;

  .sentinel-segmented-btn {
    position: relative;
    background: transparent;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    transition: all 0.2s ease;
    z-index: 2;
    min-width: 100px;

    &:hover {
      color: #334155;
    }

    &.active {
      color: #0f172a;
      font-weight: 600;
    }
  }

  .slider {
    position: absolute;
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    z-index: 1;
  }
}

.sentinel-segmented-desc {
  color: #64748b;
  font-size: 13px;
  margin-top: 8px;
}

/* File Monitoring - Custom Files Options */

.sentinel-custom-files-options {
  margin-top: 15px;
  margin-left: 20px;

  h5 {
    margin: 0 0 8px 0;
    color: #374151;
    font-weight: 500;
    font-size: 14px;
  }

  textarea {
    width: 100%;
    max-width: 500px;
    height: 100px;
    font-family: "Monaco", "Menlo", monospace;
    font-size: 13px;
    resize: vertical;
  }

  small {
    display: block;
    margin-top: 5px;
    color: #6b7280;
    font-size: 12px;
  }
}

/* Premium Feature Indicators */
.sentinel-premium-indicator {
  color: #f59e0b;
  font-size: 12px;
  margin-left: 6px;
  cursor: help;
}

.sentinel-disabled-option {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;

  input[type="checkbox"] {
    cursor: not-allowed !important;
    pointer-events: none !important;

    // Disable WordPress toggle styling interaction
    &:before,
    &:after {
      pointer-events: none !important;
    }
  }

  // Disable the label click too
  label {
    pointer-events: none !important;
    cursor: not-allowed !important;
  }

  span {
    color: #9ca3af;
    pointer-events: none;
  }

  // Keep premium indicators bright even when disabled
  .sentinel-premium-indicator {
    opacity: 1;
    color: #f59e0b !important;
    pointer-events: none;
  }
}

.sentinel-premium-key {
  margin-top: 15px;
  padding: 8px 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 13px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 8px;

  .sentinel-premium-indicator {
    margin-left: 0;
    margin-right: 4px;
  }

  .sentinel-upgrade-link {
    margin-left: auto;
    font-size: 12px;
    text-decoration: none;
    color: #2563eb;

    &:hover {
      text-decoration: underline;
    }
  }
}

.sentinel-test-button-container {
  margin-top: 20px;
}

.sentinel-test-result {
  margin-left: 10px;
}

.sentinel-resource-warning {
  color: #d63638;
  font-size: 11px;
  margin-left: 5px;
}

.sentinel-upgrade-link {
  color: #0073aa;
  text-decoration: none;

  &:hover {
    text-decoration: underline;
  }
}

/* Pagination Styles (converted from CSS) */
.tablenav-pages {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 24px 0 16px 0 !important;
  font-size: 1.2em;
  font-weight: 600;
  background: #f6f7f7;
  border: 1px solid #ccd0d4;
  border-radius: 4px;
  padding: 12px 0;

  a,
  span {
    margin: 0 8px;
    padding: 4px 10px;
    border-radius: 3px;
    text-decoration: none;
    color: #2271b1;

    &.current,
    &:hover {
      background: #2271b1;
      color: #fff;
    }
  }
}

/* Sentinel Dashboard Styles (converted from CSS) */
.sentinel-dashboard {
  .sentinel-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 32px;
    margin-bottom: 18px;
  }

  .sentinel-logo-card {
    background: #fff;
    border-radius: 18px;
    box-shadow:
      0 4px 24px rgba(0, 0, 0, 0.1),
      0 1.5px 4px rgba(0, 0, 0, 0.04);
    padding: 24px 36px 18px 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition:
      box-shadow 0.2s,
      transform 0.2s;
    border: 1.5px solid #f1f3f6;

    &:hover {
      box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.16),
        0 2px 8px rgba(0, 0, 0, 0.08);
      transform: translateY(-2px) scale(1.025);
    }
  }

  .sentinel-logo img {
    max-height: 72px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
    margin-bottom: 0;
    background: transparent;
    border-radius: 12px;
    transition: filter 0.2s;
  }

  .sentinel-dashboard-title {
    text-align: center;
    font-size: 2.3em;
    font-weight: 700;
    margin-top: 18px;
    margin-bottom: 38px;
    letter-spacing: 0.5px;
    color: #23282d;
  }

  .sentinel-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
  }

  .sentinel-stat-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 28px 20px 20px 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    min-height: 120px;
    position: relative;
    transition: box-shadow 0.2s;

    &:hover {
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
      z-index: 2;
    }
  }

  .sentinel-stat-icon {
    font-size: 2.2em;
    color: #0073aa;
    margin-right: 18px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .sentinel-stat-content {
    flex: 1;
  }

  .sentinel-stat-value {
    font-size: 2em;
    font-weight: 700;
    color: #23282d;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
  }

  .sentinel-stat-label {
    color: #666;
    font-size: 1em;
    font-weight: 500;
  }

  .sentinel-card--premium {
    position: relative;
    overflow: hidden;
    opacity: 0.7;
    filter: blur(0.5px) grayscale(0.2);
  }

  .sentinel-premium-blur {
    filter: blur(2px);
    user-select: none;
  }

  .sentinel-premium-label {
    background: #ffd700;
    color: #333;
    font-size: 0.8em;
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: 6px;
    font-weight: bold;
  }

  .sentinel-premium-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    pointer-events: none;
    font-size: 2.2em;
    color: #bbb;
  }

  // Responsive breakpoints
  @media (max-width: 900px) {
    .sentinel-stats-grid {
      grid-template-columns: 1fr 1fr;
    }
  }

  @media (max-width: 600px) {
    .sentinel-stats-grid {
      grid-template-columns: 1fr;
    }

    .sentinel-dashboard-title {
      font-size: 1.3em;
    }

    .sentinel-stat-card {
      padding: 18px 10px 14px 10px;
    }

    .sentinel-logo img {
      max-height: 48px;
    }

    .sentinel-logo-card {
      padding: 14px 10px 10px 10px;
    }
  }
}

/* Dashboard Charts Section (converted from CSS) */
.sentinel-dashboard {
  .sentinel-charts-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 36px;
  }

  .sentinel-chart-container {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 220px;
    transition:
      box-shadow 0.2s,
      transform 0.2s;

    &:hover {
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
      transform: translateY(-1px);
    }

    h3 {
      font-size: 1.1em;
      font-weight: 600;
      margin-bottom: 12px;
      color: #23282d;
      text-align: center;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      width: 100%;
    }

    canvas {
      width: 100% !important;
      height: 180px !important;
      max-width: 100%;
    }
  }

  // Responsive design for charts
  @media (max-width: 1200px) {
    .sentinel-charts-section {
      grid-template-columns: repeat(2, 1fr);
      gap: 16px;
    }

    .sentinel-chart-container {
      min-height: 200px;
      padding: 14px;

      canvas {
        height: 140px !important;
      }
    }
  }

  @media (max-width: 768px) {
    .sentinel-charts-section {
      grid-template-columns: 1fr;
      gap: 16px;
    }

    .sentinel-chart-container {
      min-height: 180px;
      padding: 12px;

      h3 {
        font-size: 1em;
        margin-bottom: 8px;
      }

      canvas {
        height: 120px !important;
      }
    }
  }
}

/* Custom Heatmap Styles (converted from CSS) */
.sentinel-dashboard .sentinel-heatmap {
  width: 100%;
  height: 180px;
  display: grid;
  grid-template-columns: 40px repeat(24, 1fr);
  grid-template-rows: 20px repeat(7, 1fr);
  gap: 1px;
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.sentinel-dashboard .sentinel-heatmap-cell {
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.2);

  &:hover {
    transform: scale(1.1);
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border-color: rgba(0, 0, 0, 0.2);
  }
}

.sentinel-dashboard .sentinel-heatmap-label {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #666;
  font-weight: 500;
  text-align: center;
}

.sentinel-dashboard .sentinel-heatmap-tooltip {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #0073aa;
  font-size: 11px;
  white-space: nowrap;
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;

  &.show {
    opacity: 1;
  }

  &::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
  }
}

// Heatmap responsive design
@media (max-width: 1200px) {
  .sentinel-dashboard .sentinel-heatmap {
    height: 160px;
    grid-template-columns: 35px repeat(24, 1fr);
    grid-template-rows: 18px repeat(7, 1fr);
    padding: 10px;
  }

  .sentinel-dashboard .sentinel-heatmap-label {
    font-size: 9px;
  }
}

@media (max-width: 768px) {
  .sentinel-dashboard .sentinel-heatmap {
    height: 140px;
    grid-template-columns: 30px repeat(24, 1fr);
    grid-template-rows: 16px repeat(7, 1fr);
    padding: 8px;
    gap: 0.5px;
  }

  .sentinel-dashboard .sentinel-heatmap-label {
    font-size: 8px;
  }
}

/* Activity Feed (converted from CSS) */
.sentinel-dashboard {
  .sentinel-activity-feed {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 24px 24px 18px 24px;
    margin-bottom: 32px;

    h3 {
      font-size: 1.3em;
      font-weight: 600;
      margin-bottom: 18px;
      color: #23282d;
    }
  }

  .sentinel-activity-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .sentinel-activity-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f6;
    font-size: 1em;

    &:last-child {
      border-bottom: none;
    }
  }

  .sentinel-activity-icon {
    font-size: 1.6em;
    color: #0073aa;
    background: #f1f3f6;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
  }

  .sentinel-activity-content {
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .sentinel-activity-text {
    font-weight: 500;
    color: #23282d;
    margin-bottom: 4px;
  }

  .sentinel-activity-meta {
    display: flex;
    gap: 12px;
    font-size: 0.95em;
    color: #666;
  }

  .sentinel-activity-time {
    color: #0073aa;
    font-weight: 500;
  }

  .sentinel-activity-user {
    color: #888;
    font-style: italic;
  }
}

/* Sentinel Logs Page Styles (converted from CSS) */
.sentinel-filters-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);

  h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;

    i {
      color: #6b7280;
    }
  }
}

.sentinel-filter-row {
  display: flex;
  gap: 20px;
  align-items: end;
  margin-bottom: 20px;
  flex-wrap: wrap;

  &:last-child {
    margin-bottom: 0;
  }
}

.sentinel-filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 160px;
  flex: 1;

  label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    margin-bottom: 4px;
  }

  select,
  input[type="text"],
  input[type="date"] {
    min-width: 150px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    transition: all 0.2s ease;

    &:focus {
      outline: none;
      border-color: #2271b1;
      box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
    }

    &:hover {
      border-color: #9ca3af;
    }
  }

  select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 36px;
    appearance: none;
  }
}

.sentinel-filter-actions {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;

  .button {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
    cursor: pointer;

    &.button-primary {
      background: #2271b1;
      border-color: #2271b1;
      color: #fff;

      &:hover {
        background: #1e5a8a;
        border-color: #1e5a8a;
      }
    }

    &:not(.button-primary) {
      background: #f6f7f7;
      border: 1px solid #dcdcde;
      color: #2c3338;

      &:hover {
        background: #f0f0f1;
        border-color: #8c8f94;
        color: #1d2327;
      }
    }
  }
}

.sentinel-results-summary {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e5e7eb;
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 24px;

  .sentinel-summary-card {
    display: flex;
    align-items: center;
    gap: 12px;

    .sentinel-summary-count {
      font-size: 24px;
      font-weight: 700;
      color: #2271b1;
    }

    .sentinel-summary-label {
      font-size: 16px;
      color: #374151;
      font-weight: 500;
    }
  }
}

.sentinel-priority {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 500;

  &-info {
    background: #e3f2fd;
    color: #1976d2;
  }

  &-warning {
    background: #fff3e0;
    color: #f57c00;
  }

  &-error {
    background: #ffebee;
    color: #d32f2f;
  }

  &-critical {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
  }
}

.sentinel-event-message {
  font-weight: 500;
  color: #23282d;
  line-height: 1.4;
  margin-bottom: 4px;
}

.sentinel-event-key {
  color: #666;
  font-size: 0.85em;
  display: flex;
  align-items: center;
  gap: 4px;

  .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
  }
}

.sentinel-log-details {
  background: #f9f9f9;
  padding: 15px;
  border-radius: 4px;
  margin: 10px 0;
}

.sentinel-detail-row {
  margin-bottom: 10px;

  &:last-child {
    margin-bottom: 0;
  }

  pre {
    background: white;
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 5px 0 0 0;
  }
}

.sentinel-pagination {
  margin-top: 20px;
  text-align: center;
}

// Responsive design for filters
@media (max-width: 768px) {
  .sentinel-filter-row {
    flex-direction: column;
    gap: 15px;
  }

  .sentinel-filter-group {
    select,
    input {
      min-width: auto;
    }
  }
}

/* Event Registry Page Styles (converted from CSS) */
.sentinel-filters {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);

  h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;

    i {
      color: #6b7280;
    }
  }

  .sentinel-filter-row {
    display: flex;
    gap: 20px;
    align-items: end;
    margin-bottom: 20px;
    flex-wrap: wrap;

    &:last-child {
      margin-bottom: 0;
    }
  }

  .sentinel-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 150px;
    flex: 1;

    label {
      font-weight: 500;
      font-size: 13px;
      color: #374151;
      margin: 0;
    }

    select,
    input[type="text"],
    input[type="date"] {
      padding: 8px 12px;
      border: 1px solid #d1d5db;
      border-radius: 6px;
      font-size: 14px;
      background: #fff;
      transition: all 0.2s ease;
      min-height: 38px;

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

      &:hover {
        border-color: #9ca3af;
      }
    }

    select {
      background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
      background-position: right 8px center;
      background-repeat: no-repeat;
      background-size: 16px;
      padding-right: 32px;
      appearance: none;
    }
  }

  .sentinel-filter-actions {
    display: flex;
    gap: 10px;
    align-items: end;
    flex-wrap: wrap;

    .button {
      padding: 8px 16px;
      font-size: 13px;
      font-weight: 500;
      border-radius: 6px;
      transition: all 0.2s ease;
      min-height: 38px;
      display: flex;
      align-items: center;
      text-decoration: none;
      border: 1px solid transparent;

      &.button-primary {
        background: #3b82f6;
        border-color: #3b82f6;
        color: #fff;

        &:hover {
          background: #2563eb;
          border-color: #2563eb;
        }
      }

      &:not(.button-primary) {
        background: #f9fafb;
        border-color: #d1d5db;
        color: #374151;

        &:hover {
          background: #f3f4f6;
          border-color: #9ca3af;
        }
      }
    }
  }

  .sentinel-results-summary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;

    .sentinel-summary-card {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .sentinel-summary-count {
      font-size: 24px;
      font-weight: 700;
      color: #1e40af;
    }

    .sentinel-summary-label {
      font-size: 14px;
      color: #64748b;
      font-weight: 500;
    }
  }
}

.sentinel-event-summary {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sentinel-summary-stats {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.sentinel-summary-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;

  .count {
    font-size: 2.5em;
    font-weight: 700;
    color: #0073aa;
    line-height: 1;
    margin-bottom: 5px;
  }

  .label {
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
  }
}

.sentinel-events-table {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

  .wp-list-table {
    border: none;
    box-shadow: none;
  }
}

.sentinel-event-key {
  font-family: "Courier New", monospace;
  font-size: 0.9em;
  background: #f8f9fa;
  padding: 2px 6px;
  border-radius: 3px;
  color: #d73502;
  border: 1px solid #e1e5e9;
}

.sentinel-category,
.sentinel-priority {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Category colors */
.sentinel-category {
  &-authentication {
    background: #e3f2fd;
    color: #1976d2;
  }

  &-content {
    background: #f3e5f5;
    color: #7b1fa2;
  }

  &-system {
    background: #e8f5e8;
    color: #388e3c;
  }

  &-errors,
  &-error {
    background: #ffebee;
    color: #d32f2f;
  }

  &-security {
    background: #fce4ec;
    color: #c2185b;
  }

  &-user {
    background: #e8f5e8;
    color: #388e3c;
  }

  &-social {
    background: #fff3e0;
    color: #f57c00;
  }

  &-bounty {
    background: #fce4ec;
    color: #c2185b;
  }

  &-collection {
    background: #e0f2f1;
    color: #00695c;
  }

  &-rating {
    background: #fff8e1;
    color: #f9a825;
  }

  &-custom {
    background: #f3e5f5;
    color: #7b1fa2;
  }
}

/* Priority colors */
.sentinel-priority {
  &-info {
    background: #e3f2fd;
    color: #1976d2;
  }

  &-warning {
    background: #fff3e0;
    color: #f57c00;
  }

  &-error {
    background: #ffebee;
    color: #d32f2f;
  }

  &-critical {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    font-weight: 600;
  }
}

.sentinel-usage-count {
  color: #0073aa;
  font-weight: 600;
  font-size: 1.1em;
}

.sentinel-no-usage {
  color: #666;
  font-style: italic;
}

.sentinel-last-triggered {
  color: #666;
  font-size: 0.9em;
}

.sentinel-never-triggered {
  color: #999;
  font-style: italic;
}

.sentinel-event-disabled {
  opacity: 0.6;
  background: #f8f9fa;

  .sentinel-event-key {
    background: #e9ecef;
    color: #6c757d;
  }
}

/* Toggle Switch Styles (converted from CSS) */
.sentinel-toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  margin: 0;

  input {
    opacity: 0;
    width: 0;
    height: 0;
  }
}

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

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

  &:hover {
    background-color: #999;
  }
}

input:checked + .sentinel-toggle-slider {
  background-color: #0073aa;

  &:before {
    transform: translateX(20px);
  }

  &:hover {
    background-color: #005a87;
  }
}

/* Privacy Request Action Buttons (converted from CSS) */
.sentinel-btn-approve {
  background-color: #28a745 !important;
  color: white !important;

  &:hover {
    background-color: #218838 !important;
  }
}

.sentinel-btn-deny {
  background-color: #dc3545 !important;
  color: white !important;

  &:hover {
    background-color: #c82333 !important;
  }
}

/* Status Badges (converted from CSS) */
.sentinel-status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sentinel-status {
  &-pending {
    background-color: #ffc107;
    color: #212529;
  }

  &-approved {
    background-color: #28a745;
    color: white;
  }

  &-denied {
    background-color: #dc3545;
    color: white;
  }

  &-enabled {
    color: #0073aa;
    font-weight: 600;
  }

  &-disabled {
    color: #d63638;
    font-weight: 600;
  }
}

/* Event Details (converted from CSS) */
.sentinel-event-details {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 4px;
  margin: 10px 0;

  h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #23282d;
    font-size: 1.1em;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
  }
}

.sentinel-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 15px;
}

.sentinel-detail-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sentinel-detail-row {
  margin-bottom: 8px;
  line-height: 1.5;

  strong {
    color: #23282d;
    min-width: 120px;
    display: inline-block;
  }
}

// Responsive Design for Event Registry
@media (max-width: 1200px) {
  .sentinel-detail-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 768px) {
  .sentinel-summary-stats {
    flex-direction: column;
    gap: 15px;
  }

  .sentinel-summary-stat .count {
    font-size: 2em;
  }

  .sentinel-events-table {
    font-size: 0.9em;
  }

  .sentinel-toggle-switch {
    width: 36px;
    height: 20px;
  }

  .sentinel-toggle-slider:before {
    height: 14px;
    width: 14px;
  }

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

  .sentinel-event-details {
    padding: 15px;
  }

  .sentinel-detail-row strong {
    min-width: auto;
    display: block;
    margin-bottom: 2px;
  }
}

/* Database Status Section (converted from CSS) */
.hndle {
  padding-left: 0.75rem !important;
}

.sentinel-db-status-success,
.sentinel-db-status-error {
  padding-left: 20px;
  font-weight: 600;
}

.sentinel-db-status-success {
  color: green;
}

.sentinel-db-status-error {
  color: red;
}

.sentinel-db-status-message {
  margin-top: 15px;
  padding: 10px;
  border-left: 4px solid;

  p {
    margin-left: 8px;
  }

  &--success {
    background: #d4edda;
    border-color: #28a745;
  }

  &--warning {
    background: #ffeaa7;
    border-color: #fdcb6e;
  }
}

/* Settings Page - Custom Tab Navigation (converted from CSS) */
.sentinel-tab-navigation {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.sentinel-tab {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  cursor: pointer;

  &:hover {
    color: #2271b1;
    background: #f8fafc;
    border-color: #2271b1;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
  }

  &.sentinel-tab-active {
    color: #2271b1;
    background: #f0f9ff;
    border-color: #2271b1;
    box-shadow: 0 4px 16px rgba(34, 113, 177, 0.15);
    transform: translateY(-2px);
  }

  i {
    font-size: 20px;
    flex-shrink: 0;
  }

  span {
    font-weight: 600;
    font-size: 14px;
  }
}

/* Settings Tab Content (converted from CSS) */
.sentinel-tab-content {
  padding: 0;
  margin-bottom: 32px;
}

.sentinel-settings-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
  transition: box-shadow 0.2s;
  margin-bottom: 1rem;

  &:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  }
}

.sentinel-settings-card-header {
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  padding: 24px;
}

.sentinel-settings-card-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 12px;

  i {
    font-size: 24px;
    color: #2271b1;
  }
}

.sentinel-settings-card-content {
  padding: 24px;

  .form-table {
    margin-top: 0;

    th {
      font-weight: 600;
      color: #374151;
      padding: 16px 0;
      vertical-align: top;
      width: 200px;
    }

    td {
      padding: 16px 0;
      vertical-align: top;
    }

    input[type="text"],
    input[type="number"],
    input[type="date"],
    select {
      border: 1px solid #d1d5db;
      border-radius: 6px;
      padding: 8px 12px;
      font-size: 14px;
      transition: border-color 0.2s;
      min-width: 200px;

      &:focus {
        outline: none;
        border-color: #2271b1;
        box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1);
      }
    }

    select {
      min-width: 250px;
    }
  }

  .description {
    color: #6b7280;
    font-size: 13px;
    line-height: 1.4;
    margin-top: 4px;
  }
}

/* Feature Preview Cards (converted from CSS) */
.sentinel-feature-preview {
  text-align: center;
  padding: 40px 20px;
}

.sentinel-feature-preview-icon {
  font-size: 64px;
  color: #d1d5db;
  margin-bottom: 20px;
}

.sentinel-feature-preview h3 {
  font-size: 24px;
  color: #111827;
  margin-bottom: 12px;
  font-weight: 600;
}

.sentinel-feature-preview > p {
  color: #6b7280;
  font-size: 16px;
  margin-bottom: 24px;
}

.sentinel-feature-list {
  max-width: 500px;
  margin: 0 auto;
  text-align: left;

  h4 {
    font-size: 18px;
    color: #111827;
    margin-bottom: 16px;
    font-weight: 600;
    text-align: center;
  }

  ul {
    list-style: none;
    padding: 0;
  }

  li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 14px;
    color: #374151;

    i {
      color: #2271b1;
      font-size: 16px;
      flex-shrink: 0;
    }
  }
}

/* Status and Info Sections (converted from CSS) */
.sentinel-settings-card-content {
  .sentinel-db-status-message,
  > div[style*="border-left"] {
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
    border-left: 4px solid #2271b1;
  }

  .sentinel-db-status-message--warning {
    background: #fffbeb;
    border-left-color: #f59e0b;
  }

  .sentinel-db-status-message--success {
    background: #f0fdf4;
    border-left-color: #10b981;
  }
}

/* Settings Page Toggle Switches (converted from CSS) */
.sentinel-settings-card-content .form-table {
  input[type="checkbox"] {
    display: none;
  }

  label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 500;
  }

  /* Special handling for checkbox labels */
  td label:has(input[type="checkbox"]) {
    position: relative;
    padding-left: 56px;
    display: block;
    margin-bottom: 8px;

    span {
      position: relative;
    }

    &::before {
      content: "";
      position: absolute;
      left: 0;
      top: 50%;
      transform: translateY(-50%);
      width: 44px;
      height: 24px;
      background-color: #ccc;
      border-radius: 12px;
      transition: background-color 0.3s ease;
    }

    &::after {
      content: "";
      position: absolute;
      left: 2px;
      top: 50%;
      transform: translateY(-50%);
      width: 20px;
      height: 20px;
      background-color: white;
      border-radius: 50%;
      transition: left 0.3s ease;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
  }

  /* Checked state */
  td label:has(input[type="checkbox"]:checked) {
    &::before {
      background-color: #007cba;
    }

    &::after {
      left: 22px;
    }
  }
}

/* Submit Button Styling (converted from CSS) */
.sentinel-dashboard .submit {
  margin-top: 30px;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  display: block !important;
  visibility: visible !important;
  position: relative !important;
  z-index: 999 !important;

  .button-primary {
    background: #2271b1;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    cursor: pointer;

    &:hover {
      background: #1a5490;
      transform: translateY(-1px);
      box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    }

    &:active {
      transform: translateY(0);
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    &:focus {
      outline: none;
      box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.3);
    }
  }
}

/* Responsive adjustments for tabs (converted from CSS) */
@media (max-width: 768px) {
  .nav-tab-wrapper {
    .nav-tab {
      padding: 8px 12px;
      font-size: 12px;
    }

    overflow-x: auto;
    white-space: nowrap;
  }
}

// Responsive Design for Settings Page
@media (max-width: 1024px) {
  .sentinel-tab-navigation {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .sentinel-tab-navigation {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .sentinel-tab {
    padding: 16px;
    flex-direction: column;
    gap: 8px;
    text-align: center;

    span {
      font-size: 12px;
    }
  }

  .sentinel-settings-card-header {
    padding: 20px;
  }

  .sentinel-settings-card-content {
    padding: 20px;
  }

  .sentinel-settings-card-title {
    font-size: 18px;
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .sentinel-settings-card-content .form-table {
    th {
      display: block;
      width: auto;
      padding: 8px 0 4px 0;
    }

    td {
      display: block;
      padding: 4px 0 16px 0;
    }
  }
}

@media (max-width: 480px) {
  .sentinel-tab-navigation {
    grid-template-columns: 1fr;
  }

  .sentinel-tab {
    padding: 12px;
  }

  .sentinel-feature-preview {
    padding: 30px 15px;
  }

  .sentinel-feature-preview-icon {
    font-size: 48px;
  }

  .sentinel-feature-preview h3 {
    font-size: 20px;
  }

  .sentinel-feature-list {
    padding: 0 10px;
  }
}

/* Activity Logs Cards Section (converted from CSS) */
.sentinel-logs-container {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.sentinel-log-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;

  &:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
  }
}

.sentinel-log-header {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e5e7eb;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  .sentinel-log-icon {
    flex-shrink: 0;
    font-size: 20px;
    color: #2271b1;
    margin-right: 16px;
  }

  .sentinel-log-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0; /* Allow text to wrap */

    .sentinel-log-title {
      margin: 0;
      font-size: 16px;
      font-weight: 600;
      color: #111827;
      line-height: 1.3;
      word-break: break-word;
    }

    .sentinel-log-subtitle {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;

      .sentinel-event-key {
        font-size: 12px;
        color: #6b7280;
        background: #f3f4f6;
        padding: 2px 8px;
        border-radius: 4px;
        font-family: monospace;
      }

      .sentinel-priority {
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 3px 8px;
        border-radius: 4px;

        &.sentinel-priority-low {
          background: #f0fdf4;
          color: #166534;
        }

        &.sentinel-priority-medium {
          background: #fffbeb;
          color: #92400e;
        }

        &.sentinel-priority-high {
          background: #fef2f2;
          color: #991b1b;
        }

        &.sentinel-priority-critical {
          background: #fef2f2;
          color: #991b1b;
          border: 1px solid #fecaca;
        }
      }
    }
  }

  .sentinel-log-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
  }
}

.sentinel-log-content {
  padding: 24px;

  .sentinel-log-description {
    font-size: 16px;
    color: #374151;
    line-height: 1.6;
    margin-bottom: 16px;
  }

  .sentinel-log-details {
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px;
    border-left: 4px solid #2271b1;

    .sentinel-log-detail-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 8px 0;
      border-bottom: 1px solid #e5e7eb;

      &:last-child {
        border-bottom: none;
      }

      .sentinel-log-detail-label {
        font-weight: 600;
        color: #374151;
        font-size: 14px;
      }

      .sentinel-log-detail-value {
        color: #6b7280;
        font-size: 14px;
        font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
      }
    }
  }
}

.sentinel-log-actions {
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
  padding: 16px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;

  .sentinel-log-action-btn {
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;

    &:hover {
      background: #f9fafb;
      border-color: #9ca3af;
      color: #111827;
    }

    &.sentinel-log-action-primary {
      background: #2271b1;
      border-color: #2271b1;
      color: #fff;

      &:hover {
        background: #1a5490;
        border-color: #1a5490;
      }
    }

    &.sentinel-log-action-danger {
      background: #dc2626;
      border-color: #dc2626;
      color: #fff;

      &:hover {
        background: #b91c1c;
        border-color: #b91c1c;
      }
    }
  }
}

/* Log Priority Indicators (converted from CSS) */
.sentinel-log-priority {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;

  &.priority-low {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
  }

  &.priority-medium {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fed7aa;
  }

  &.priority-high {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
  }

  &.priority-critical {
    background: #450a0a;
    color: #fecaca;
    border: 1px solid #7f1d1d;
  }

  i {
    font-size: 10px;
  }
}

/* Log Categories (converted from CSS) */
.sentinel-log-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;

  i {
    font-size: 12px;
  }

  &.category-security {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
  }

  &.category-performance {
    background: #f0f9ff;
    color: #1e40af;
    border-color: #bfdbfe;
  }

  &.category-user {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
  }

  &.category-system {
    background: #fefce8;
    color: #a16207;
    border-color: #fde68a;
  }
}

/* Log Grid Layout (converted from CSS) */
.sentinel-logs-grid {
  display: block; /* Use block instead of grid for stacked rows */
  margin-top: 20px;

  .sentinel-log-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    margin-bottom: 16px; /* Space between accordion items */
    transition: all 0.2s ease;

    &:hover {
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    &.expanded {
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
  }
}

/* Log Info Section (accordion style) */
.sentinel-log-info {
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
  padding: 16px 24px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;

  .sentinel-log-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;

    i {
      color: #9ca3af;
      font-size: 16px;
    }

    span {
      font-weight: 500;
    }
  }
}

/* Log Details Section (expandable accordion) */
.sentinel-log-details {
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  padding: 24px;
  display: none; /* Hidden by default */

  &.show {
    display: block;
  }

  .sentinel-log-details-content {
    h4 {
      margin: 0 0 16px 0;
      color: #374151;
      font-size: 16px;
      font-weight: 600;
    }

    .sentinel-detail-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 20px;
      margin-bottom: 20px;

      .sentinel-detail-column {
        .sentinel-detail-row {
          display: flex;
          justify-content: space-between;
          padding: 8px 0;
          border-bottom: 1px solid #e5e7eb;
          font-size: 14px;

          &:last-child {
            border-bottom: none;
          }

          strong {
            color: #374151;
            font-weight: 600;
            min-width: 120px;
          }
        }
      }
    }

    .sentinel-detail-section {
      margin-top: 20px;
      padding-top: 20px;
      border-top: 1px solid #e5e7eb;

      > strong {
        display: block;
        margin-bottom: 12px;
        color: #374151;
        font-size: 15px;
        font-weight: 600;
      }

      .sentinel-detail-row {
        margin-bottom: 8px;
        font-size: 14px;

        strong {
          color: #6b7280;
          font-weight: 500;
        }
      }
    }

    .sentinel-raw-data {
      background: #1f2937;
      color: #f9fafb;
      padding: 16px;
      border-radius: 6px;
      font-size: 12px;
      line-height: 1.5;
      overflow-x: auto;
      white-space: pre-wrap;
      word-break: break-word;
    }
  }
}

/* Compact Log View (converted from CSS) */
.sentinel-logs-compact {
  .sentinel-log-card {
    border-radius: 8px;
    margin-bottom: 12px;

    .sentinel-log-header {
      padding: 16px 20px;
      background: #fff;

      .sentinel-log-title {
        font-size: 16px;
      }
    }

    .sentinel-log-content {
      padding: 20px;

      .sentinel-log-description {
        font-size: 14px;
        margin-bottom: 12px;
      }
    }

    .sentinel-log-actions {
      padding: 12px 20px;
    }
  }
}

/* Log Loading States (converted from CSS) */
.sentinel-log-skeleton {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;

  .sentinel-skeleton-header {
    background: #f8fafc;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;

    .sentinel-skeleton-title {
      height: 20px;
      background: #e5e7eb;
      border-radius: 4px;
      width: 60%;
      margin-bottom: 8px;
      animation: skeleton-pulse 1.5s ease-in-out infinite alternate;
    }

    .sentinel-skeleton-meta {
      height: 14px;
      background: #e5e7eb;
      border-radius: 4px;
      width: 40%;
      animation: skeleton-pulse 1.5s ease-in-out infinite alternate;
    }
  }

  .sentinel-skeleton-content {
    padding: 24px;

    .sentinel-skeleton-line {
      height: 16px;
      background: #e5e7eb;
      border-radius: 4px;
      margin-bottom: 12px;
      animation: skeleton-pulse 1.5s ease-in-out infinite alternate;

      &:nth-child(1) {
        width: 100%;
      }
      &:nth-child(2) {
        width: 85%;
      }
      &:nth-child(3) {
        width: 70%;
      }
    }
  }
}

@keyframes skeleton-pulse {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0.4;
  }
}

/* Performance Status Section - Enhanced WordPress Admin Style */
.sentinel-performance-status {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border: 1px solid #c3c4c7;
  border-radius: 8px;
  padding: 24px;
  margin: 24px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: relative;

  &::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0073aa 0%, #005177 100%);
    border-radius: 8px 8px 0 0;
  }

  > h4 {
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 24px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #f0f0f1;
    padding-bottom: 12px;

    &::before {
      content: "⚡";
      font-size: 22px;
      color: #0073aa;
    }
  }

  // Info section styling
  > div[style*="border-radius"] {
    background: #f0f6fc;
    border: 1px solid #0073aa;
    border-radius: 6px;
    padding: 16px;
    margin: 20px 0;
    border-left: 4px solid #0073aa;

    h5 {
      color: #0a4b78;
      font-weight: 600;
      margin-bottom: 10px;
      font-size: 15px;
    }

    p {
      color: #1e3a5f;
      line-height: 1.6;
      margin: 8px 0;
    }

    ul {
      margin: 10px 0 10px 20px;

      li {
        color: #2c5282;
        margin-bottom: 6px;
      }
    }
  }
}

.sentinel-performance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.sentinel-performance-card {
  background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
  border: 1px solid #c3c4c7;
  border-radius: 12px;
  padding: 24px;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.08),
    0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in-out;
  position: relative;
  overflow: hidden;

  &::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0073aa 0%, #005177 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  &:hover {
    border-color: #0073aa;
    box-shadow:
      0 4px 16px rgba(0, 115, 170, 0.15),
      0 2px 4px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);

    &::before {
      opacity: 1;
    }
  }

  > h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f1;
    position: relative;

    .emoji {
      font-size: 18px;
      display: inline-block;
      width: 24px;
      text-align: center;
    }

    .sentinel-status-icon {
      font-size: 16px;
      width: 20px;
      text-align: center;
    }
  }

  > p {
    color: #50575e;
    margin: 12px 0;
    line-height: 1.6;
    font-size: 14px;

    strong {
      color: #1d2327;
      font-weight: 600;
    }
  }

  // Enhanced warning/critical message styling
  p[style*="color: #dc2626"],
  p[style*="color: #d97706"],
  p[style*="color: #ff6b6b"] {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    margin: 16px 0;
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 8px;

    &[style*="#dc2626"] {
      background: #fef2f2;
      border-left-color: #dc2626;
      color: #dc2626 !important;
    }

    &[style*="#d97706"] {
      background: #fffbeb;
      border-left-color: #d97706;
      color: #d97706 !important;
    }

    &[style*="#ff6b6b"] {
      background: #fef2f2;
      border-left-color: #ef4444;
      color: #dc2626 !important;
    }
  }

  // Enhanced memory and batch stats
  .sentinel-memory-stats,
  .sentinel-batch-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin: 16px 0;

    .sentinel-memory-stat,
    .sentinel-batch-stat {
      background: #f8f9fa;
      border: 1px solid #e5e7eb;
      border-radius: 8px;
      padding: 16px 12px;
      text-align: center;
      transition: all 0.15s ease;

      &:hover {
        background: #f1f3f4;
        border-color: #d1d5db;
        transform: translateY(-1px);
      }

      .value {
        font-size: 18px;
        font-weight: 700;
        color: #1d2327;
        margin-bottom: 4px;
        display: block;
        line-height: 1.2;
      }

      .label {
        font-size: 11px;
        color: #6b7280;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        line-height: 1.3;
      }
    }
  }

  // Enhanced action buttons
  .sentinel-batch-actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f1;
    flex-wrap: wrap;

    .button {
      flex: 1;
      padding: 10px 16px;
      border-radius: 6px;
      font-size: 12px;
      font-weight: 500;
      text-align: center;
      transition: all 0.2s ease;
      min-width: 120px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      text-decoration: none;

      &.button-primary {
        background: #0073aa;
        border: 1px solid #0073aa;
        color: #ffffff;

        &:hover:not([disabled]) {
          background: #005177;
          border-color: #005177;
          transform: translateY(-1px);
          box-shadow: 0 2px 4px rgba(0, 115, 170, 0.3);
        }

        &[disabled] {
          opacity: 0.6;
          cursor: not-allowed;
          transform: none;
        }
      }

      &:not(.button-primary) {
        background: #f6f7f7;
        border: 1px solid #c3c4c7;
        color: #50575e;

        &:hover {
          background: #f0f0f1;
          border-color: #8c8f94;
          color: #1d2327;
        }
      }
    }
  }

  // Enhanced timing display
  .sentinel-next-batch-time {
    margin-top: 16px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    border-left: 3px solid #0073aa;
    color: #50575e;

    span[style*="color: #ff6b6b"],
    span[style*="color: #d63638"] {
      font-weight: 600;
      color: #dc2626 !important;
    }
  }
}

/* Memory Insights Section - Separate from Rate Limiting */
.sentinel-memory-insights {
  background: #fff;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);

  h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 20px 0;
    border-bottom: 1px solid #dcdcde;
    padding-bottom: 10px;
  }

  .sentinel-performance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
  }

  .sentinel-performance-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);

    &:hover {
      border-color: #8c8f94;
    }

    h4 {
      font-size: 16px;
      font-weight: 600;
      color: #1d2327;
      margin: 0 0 15px 0;
      padding-bottom: 8px;
      border-bottom: 1px solid #dcdcde;
    }

    .sentinel-memory-stats {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
      gap: 12px;
      margin: 15px 0;

      .sentinel-memory-stat {
        background: #f6f7f7;
        border: 1px solid #dcdcde;
        border-radius: 4px;
        padding: 12px;
        text-align: center;

        .value {
          font-size: 20px;
          font-weight: 700;
          color: #1d2327;
          margin-bottom: 4px;
          display: block;
        }

        .label {
          font-size: 12px;
          color: #50575e;
          font-weight: 500;
          text-transform: uppercase;
        }
      }
    }

    // Test data buttons
    .button {
      font-size: 12px;
      padding: 6px 12px;
      height: auto;
      line-height: 1.4;

      &.button-secondary {
        background: #f6f7f7;
        border-color: #c3c4c7;
        color: #50575e;

        &:hover {
          background: #f0f0f1;
          border-color: #8c8f94;
        }
      }
    }
  }
}

/* Progress Bars - Clean WordPress Admin Style */
.sentinel-progress-bar {
  width: 100%;
  height: 12px;
  background: #f0f0f1;
  border-radius: 8px;
  overflow: hidden;
  margin: 16px 0;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);

  .sentinel-progress-fill {
    height: 100%;
    background: #0073aa;
    border-radius: 8px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);

    &::after {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
      border-radius: 8px;
      animation: progress-shine 2s ease-in-out infinite;
    }

    // Template classes matching PHP
    &.good {
      background: linear-gradient(90deg, #46b450 0%, #4caf50 100%);
      box-shadow: 0 1px 3px rgba(70, 180, 80, 0.3);
    }

    &.warning {
      background: linear-gradient(90deg, #ffb900 0%, #ff9800 100%);
      box-shadow: 0 1px 3px rgba(255, 185, 0, 0.3);
    }

    &.critical {
      background: linear-gradient(90deg, #dc3232 0%, #f44336 100%);
      box-shadow: 0 1px 3px rgba(220, 50, 50, 0.3);
      animation: progress-critical-pulse 1.5s ease-in-out infinite;
    }
  }
}

@keyframes progress-shine {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes progress-stripes {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 16px 0;
  }
}

@keyframes progress-critical-pulse {
  0%,
  100% {
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.6);
    transform: scale(1.02);
  }
}

@keyframes critical-pulse {
  0%,
  100% {
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
  }
  50% {
    box-shadow: 0 2px 16px rgba(239, 68, 68, 0.6);
  }
}

/* Memory Usage Charts (converted from CSS) */
.sentinel-memory-chart {
  background: #f8fafc;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;

  .sentinel-memory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;

    h4 {
      margin: 0;
      font-size: 16px;
      font-weight: 600;
      color: #111827;
    }

    .sentinel-memory-status {
      padding: 4px 12px;
      border-radius: 20px;
      font-size: 12px;
      font-weight: 600;
      text-transform: uppercase;

      &.status-normal {
        background: #f0fdf4;
        color: #166534;
      }

      &.status-elevated {
        background: #fffbeb;
        color: #92400e;
      }

      &.status-critical {
        background: #fef2f2;
        color: #991b1b;
      }
    }
  }

  .sentinel-memory-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;

    .sentinel-memory-bar {
      display: flex;
      align-items: center;
      gap: 12px;

      .sentinel-memory-label {
        min-width: 80px;
        font-size: 12px;
        color: #6b7280;
        font-weight: 500;
      }

      .sentinel-memory-progress {
        flex: 1;
        height: 6px;
        background: #e5e7eb;
        border-radius: 3px;
        overflow: hidden;

        .sentinel-memory-fill {
          height: 100%;
          border-radius: 3px;
          transition: width 0.3s ease;

          &.memory-php {
            background: #8b5cf6;
          }

          &.memory-wp {
            background: #06b6d4;
          }

          &.memory-plugins {
            background: #f59e0b;
          }

          &.memory-themes {
            background: #10b981;
          }
        }
      }

      .sentinel-memory-value {
        min-width: 60px;
        font-size: 12px;
        color: #374151;
        font-weight: 600;
        text-align: right;
      }
    }
  }
}

/* System Health Indicators (converted from CSS) */
.sentinel-health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.sentinel-health-item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  transition: all 0.2s ease;

  &:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .sentinel-health-icon {
    font-size: 32px;
    margin-bottom: 12px;

    &.health-good {
      color: #059669;
    }

    &.health-warning {
      color: #d97706;
    }

    &.health-error {
      color: #dc2626;
    }
  }

  .sentinel-health-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
  }

  .sentinel-health-value {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;

    &.health-good {
      color: #059669;
    }

    &.health-warning {
      color: #d97706;
    }

    &.health-error {
      color: #dc2626;
    }
  }

  .sentinel-health-label {
    font-size: 12px;
    color: #6b7280;
  }
}

/* Performance Recommendations (converted from CSS) */
.sentinel-recommendations {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 20px;

  .sentinel-recommendations-header {
    background: #f8fafc;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;

    h3 {
      margin: 0;
      font-size: 18px;
      font-weight: 600;
      color: #111827;
      display: flex;
      align-items: center;
      gap: 12px;

      i {
        font-size: 20px;
        color: #2271b1;
      }
    }
  }

  .sentinel-recommendations-list {
    padding: 0;
    margin: 0;
    list-style: none;

    .sentinel-recommendation-item {
      padding: 20px 24px;
      border-bottom: 1px solid #f3f4f6;
      display: flex;
      align-items: flex-start;
      gap: 16px;

      &:last-child {
        border-bottom: none;
      }

      .sentinel-recommendation-icon {
        flex-shrink: 0;
        width: 40px;
        height: 40px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;

        &.priority-high {
          background: #fef2f2;
          color: #dc2626;
        }

        &.priority-medium {
          background: #fffbeb;
          color: #d97706;
        }

        &.priority-low {
          background: #f0fdf4;
          color: #059669;
        }
      }

      .sentinel-recommendation-content {
        flex: 1;

        .sentinel-recommendation-title {
          font-size: 16px;
          font-weight: 600;
          color: #111827;
          margin-bottom: 8px;
        }

        .sentinel-recommendation-description {
          font-size: 14px;
          color: #6b7280;
          line-height: 1.5;
          margin-bottom: 12px;
        }

        .sentinel-recommendation-actions {
          display: flex;
          gap: 12px;

          .sentinel-recommendation-btn {
            padding: 6px 12px;
            border: 1px solid #d1d5db;
            background: #fff;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 500;
            color: #374151;
            text-decoration: none;
            transition: all 0.2s ease;

            &:hover {
              background: #f9fafb;
              border-color: #9ca3af;
            }

            &.btn-primary {
              background: #2271b1;
              border-color: #2271b1;
              color: #fff;

              &:hover {
                background: #1a5490;
              }
            }
          }
        }
      }
    }
  }
}

/* Notification Settings Section (converted from CSS) */
.sentinel-notification-settings {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;

  .sentinel-notification-header {
    background: #f8fafc;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;

    h3 {
      margin: 0;
      font-size: 18px;
      font-weight: 600;
      color: #111827;
      display: flex;
      align-items: center;
      gap: 12px;

      i {
        font-size: 20px;
        color: #2271b1;
      }
    }
  }

  .sentinel-notification-content {
    padding: 24px;
  }
}

/* Email Notification Card Groups (Settings Page) */
.sentinel-email-card-group {
  margin-bottom: 24px;

  &:last-child {
    margin-bottom: 0;
  }

  h4 {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 8px;

    &::before {
      content: "";
      width: 4px;
      height: 20px;
      background: #2271b1;
      border-radius: 2px;
    }
  }

  .sentinel-email-card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
  }
}

.sentinel-email-pill-toggle {
  position: relative;
  display: inline-block;

  input[type="checkbox"] {
    display: none;
  }

  label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    white-space: nowrap;
    min-height: 36px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);

    &:hover {
      background: #f1f5f9;
      border-color: #cbd5e1;
      color: #334155;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
      transform: translateY(-1px);
    }
  }

  input[type="checkbox"]:checked + label {
    background: linear-gradient(135deg, #2271b1 0%, #1e40af 100%);
    border-color: #1e40af;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(34, 113, 177, 0.3);

    &:hover {
      background: linear-gradient(135deg, #1a5490 0%, #1e3a8a 100%);
      border-color: #1e3a8a;
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(34, 113, 177, 0.4);
    }
  }

  // Special styling for different notification types
  &.notification-critical input[type="checkbox"]:checked + label {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border-color: #b91c1c;

    &:hover {
      background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
      border-color: #991b1b;
    }
  }

  &.notification-security input[type="checkbox"]:checked + label {
    background: linear-gradient(135deg, #7c2d12 0%, #9a3412 100%);
    border-color: #9a3412;

    &:hover {
      background: linear-gradient(135deg, #9a3412 0%, #c2410c 100%);
      border-color: #c2410c;
    }
  }

  &.notification-success input[type="checkbox"]:checked + label {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border-color: #047857;

    &:hover {
      background: linear-gradient(135deg, #047857 0%, #065f46 100%);
      border-color: #065f46;
    }
  }
}

/* Notification Pills/Toggle Groups (General) */
.sentinel-notification-group {
  margin-bottom: 24px;

  &:last-child {
    margin-bottom: 0;
  }

  .sentinel-notification-label {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
    display: block;
  }

  .sentinel-notification-description {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 16px;
    line-height: 1.5;
  }

  .sentinel-notification-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    .sentinel-notification-pill {
      position: relative;

      input[type="checkbox"] {
        display: none;
      }

      label {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 8px 16px;
        background: #f3f4f6;
        border: 1px solid #d1d5db;
        border-radius: 20px;
        font-size: 14px;
        font-weight: 500;
        color: #374151;
        cursor: pointer;
        transition: all 0.2s ease;
        user-select: none;

        i {
          font-size: 14px;
        }

        &:hover {
          background: #e5e7eb;
          border-color: #9ca3af;
        }
      }

      input[type="checkbox"]:checked + label {
        background: #2271b1;
        border-color: #2271b1;
        color: #fff;

        &:hover {
          background: #1a5490;
          border-color: #1a5490;
        }
      }

      &.pill-email input[type="checkbox"]:checked + label {
        background: #059669;
        border-color: #059669;

        &:hover {
          background: #047857;
        }
      }

      &.pill-sms input[type="checkbox"]:checked + label {
        background: #d97706;
        border-color: #d97706;

        &:hover {
          background: #b45309;
        }
      }

      &.pill-slack input[type="checkbox"]:checked + label {
        background: #7c3aed;
        border-color: #7c3aed;

        &:hover {
          background: #6d28d9;
        }
      }
    }
  }
}

/* Modal Styles & Overlays (converted from CSS) */
.sentinel-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: 100000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;

  &.sentinel-modal-active {
    opacity: 1;
    visibility: visible;
  }
}

.sentinel-modal {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s ease;

  .sentinel-modal-active & {
    transform: scale(1) translateY(0);
  }

  .sentinel-modal-header {
    background: #f8fafc;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;

    h3 {
      margin: 0;
      font-size: 18px;
      font-weight: 600;
      color: #111827;
    }

    .sentinel-modal-close {
      background: none;
      border: none;
      font-size: 20px;
      color: #6b7280;
      cursor: pointer;
      padding: 4px;
      border-radius: 4px;
      transition: all 0.2s ease;

      &:hover {
        background: #e5e7eb;
        color: #374151;
      }
    }
  }

  .sentinel-modal-content {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;

    p {
      font-size: 14px;
      color: #6b7280;
      line-height: 1.6;
      margin-bottom: 16px;

      &:last-child {
        margin-bottom: 0;
      }
    }
  }

  .sentinel-modal-footer {
    background: #f8fafc;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;

    .sentinel-modal-btn {
      padding: 8px 16px;
      border: 1px solid #d1d5db;
      background: #fff;
      border-radius: 6px;
      font-size: 14px;
      font-weight: 500;
      color: #374151;
      cursor: pointer;
      transition: all 0.2s ease;

      &:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
      }

      &:active {
        transform: translateY(0);
      }

      &.sentinel-btn-primary {
        background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
        border-color: #135e96;
        color: #ffffff;

        &:hover {
          background: linear-gradient(135deg, #135e96 0%, #0f4c7c 100%);
          border-color: #0f4c7c;
        }
      }

      &.sentinel-btn-secondary {
        background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
        border-color: #4b5563;
        color: #ffffff;

        &:hover {
          background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
          border-color: #374151;
        }
      }

      &.sentinel-btn-danger {
        background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
        border-color: #b91c1c;
        color: #ffffff;

        &:hover {
          background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
          border-color: #991b1b;
        }
      }

      &.btn-primary {
        background: #2271b1;
        border-color: #2271b1;
        color: #fff;

        &:hover {
          background: #1a5490;
          border-color: #1a5490;
        }
      }

      &.btn-danger {
        background: #dc2626;
        border-color: #dc2626;
        color: #fff;

        &:hover {
          background: #b91c1c;
          border-color: #b91c1c;
        }
      }
    }
  }
}

/* Export Controls & Segmented Toggles (converted from CSS) */
.sentinel-export-controls {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;

  .sentinel-export-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;

    i {
      font-size: 24px;
      color: #2271b1;
    }

    h3 {
      margin: 0;
      font-size: 18px;
      font-weight: 600;
      color: #111827;
    }
  }

  .sentinel-export-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
  }

  .sentinel-export-option {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s ease;

    &:hover {
      border-color: #2271b1;
      box-shadow: 0 2px 8px rgba(34, 113, 177, 0.1);
    }

    .sentinel-export-option-header {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 12px;

      i {
        font-size: 20px;
        color: #2271b1;
      }

      h4 {
        margin: 0;
        font-size: 16px;
        font-weight: 600;
        color: #111827;
      }
    }

    .sentinel-export-option-description {
      font-size: 14px;
      color: #6b7280;
      line-height: 1.5;
      margin-bottom: 16px;
    }

    .sentinel-export-option-controls {
      display: flex;
      align-items: center;
      gap: 12px;

      .sentinel-export-btn {
        flex: 1;
        padding: 8px 16px;
        border: 1px solid #d1d5db;
        background: #fff;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 500;
        color: #374151;
        text-align: center;
        cursor: pointer;
        transition: all 0.2s ease;

        &:hover {
          background: #f9fafb;
          border-color: #9ca3af;
        }

        &.btn-primary {
          background: #2271b1;
          border-color: #2271b1;
          color: #fff;

          &:hover {
            background: #1a5490;
          }
        }
      }
    }
  }
}

/* Segmented Control Component (converted from CSS) */
.sentinel-segmented-control {
  display: inline-flex;
  background: #f3f4f6;
  border-radius: 8px;
  padding: 2px;
  position: relative;

  input[type="radio"] {
    display: none;
  }

  label {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;

    &:hover {
      color: #374151;
    }
  }

  input[type="radio"]:checked + label {
    color: #111827;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }
}

/* Dashboard Widgets Section (converted from CSS) */
.sentinel-dashboard-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.sentinel-widget {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;

  &:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
  }

  .sentinel-widget-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;

    h4 {
      margin: 0;
      font-size: 16px;
      font-weight: 600;
      color: #111827;
      display: flex;
      align-items: center;
      gap: 8px;

      i {
        font-size: 18px;
        color: #2271b1;
      }
    }

    .sentinel-widget-actions {
      display: flex;
      gap: 8px;

      .sentinel-widget-action {
        padding: 4px 8px;
        background: none;
        border: 1px solid #d1d5db;
        border-radius: 4px;
        font-size: 12px;
        color: #6b7280;
        cursor: pointer;
        transition: all 0.2s ease;

        &:hover {
          background: #f3f4f6;
          border-color: #9ca3af;
          color: #374151;
        }
      }
    }
  }

  .sentinel-widget-content {
    padding: 20px;

    .sentinel-widget-stat {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 12px 0;
      border-bottom: 1px solid #f3f4f6;

      &:last-child {
        border-bottom: none;
      }

      .sentinel-stat-label {
        font-size: 14px;
        color: #6b7280;
        font-weight: 500;
      }

      .sentinel-stat-value {
        font-size: 16px;
        font-weight: 700;
        color: #111827;

        &.stat-success {
          color: #059669;
        }

        &.stat-warning {
          color: #d97706;
        }

        &.stat-error {
          color: #dc2626;
        }
      }
    }
  }

  &.widget-compact {
    .sentinel-widget-header {
      padding: 12px 16px;

      h4 {
        font-size: 14px;
      }
    }

    .sentinel-widget-content {
      padding: 16px;

      .sentinel-widget-stat {
        padding: 8px 0;

        .sentinel-stat-label {
          font-size: 12px;
        }

        .sentinel-stat-value {
          font-size: 14px;
        }
      }
    }
  }
}

/* Memory Insights & Batch Stats (converted from CSS) */
.sentinel-memory-insights {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;

  .sentinel-insights-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;

    i {
      font-size: 24px;
      color: #8b5cf6;
    }

    h3 {
      margin: 0;
      font-size: 18px;
      font-weight: 600;
      color: #111827;
    }
  }

  .sentinel-insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;

    .sentinel-insight-item {
      background: #f8fafc;
      border-radius: 8px;
      padding: 16px;
      text-align: center;

      .sentinel-insight-icon {
        font-size: 28px;
        margin-bottom: 8px;

        &.insight-memory {
          color: #8b5cf6;
        }

        &.insight-cpu {
          color: #f59e0b;
        }

        &.insight-disk {
          color: #10b981;
        }

        &.insight-network {
          color: #06b6d4;
        }
      }

      .sentinel-insight-value {
        font-size: 20px;
        font-weight: 700;
        color: #111827;
        margin-bottom: 4px;
      }

      .sentinel-insight-label {
        font-size: 12px;
        color: #6b7280;
        text-transform: uppercase;
        letter-spacing: 0.5px;
      }
    }
  }
}

.sentinel-batch-stats {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;

  .sentinel-batch-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;

    h3 {
      margin: 0;
      font-size: 18px;
      font-weight: 600;
      color: #111827;
      display: flex;
      align-items: center;
      gap: 12px;

      i {
        font-size: 20px;
        color: #2271b1;
      }
    }

    .sentinel-batch-status {
      padding: 4px 12px;
      border-radius: 20px;
      font-size: 12px;
      font-weight: 600;
      text-transform: uppercase;

      &.status-active {
        background: #f0fdf4;
        color: #166534;
      }

      &.status-idle {
        background: #f3f4f6;
        color: #6b7280;
      }

      &.status-error {
        background: #fef2f2;
        color: #991b1b;
      }
    }
  }

  .sentinel-batch-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;

    .sentinel-batch-metric {
      text-align: center;
      padding: 12px;
      background: #f8fafc;
      border-radius: 8px;

      .sentinel-metric-number {
        font-size: 24px;
        font-weight: 700;
        color: #111827;
        margin-bottom: 4px;
      }

      .sentinel-metric-text {
        font-size: 12px;
        color: #6b7280;
        text-transform: uppercase;
        letter-spacing: 0.5px;
      }
    }
  }
}

/* Utility Classes & Responsive Overrides (converted from CSS) */
.sentinel-hidden {
  display: none !important;
}

.sentinel-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.sentinel-text-center {
  text-align: center !important;
}

.sentinel-text-left {
  text-align: left !important;
}

.sentinel-text-right {
  text-align: right !important;
}

.sentinel-mb-0 {
  margin-bottom: 0 !important;
}

.sentinel-mb-1 {
  margin-bottom: 8px !important;
}

.sentinel-mb-2 {
  margin-bottom: 16px !important;
}

.sentinel-mb-3 {
  margin-bottom: 24px !important;
}

.sentinel-mt-0 {
  margin-top: 0 !important;
}

.sentinel-mt-1 {
  margin-top: 8px !important;
}

.sentinel-mt-2 {
  margin-top: 16px !important;
}

.sentinel-mt-3 {
  margin-top: 24px !important;
}

.sentinel-p-0 {
  padding: 0 !important;
}

.sentinel-p-1 {
  padding: 8px !important;
}

.sentinel-p-2 {
  padding: 16px !important;
}

.sentinel-p-3 {
  padding: 24px !important;
}

/* Responsive Design for Rate Limiting & Memory Insights */
@media (max-width: 1200px) {
  .sentinel-performance-grid,
  .sentinel-memory-insights .sentinel-performance-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .sentinel-performance-card {
    padding: 16px;
  }

  .sentinel-memory-insights {
    padding: 16px;
  }

  .sentinel-dashboard-widgets {
    grid-template-columns: repeat(2, 1fr);
  }

  .sentinel-insights-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sentinel-performance-status,
  .sentinel-memory-insights {
    padding: 16px;
    margin: 16px 0;

    h4 {
      font-size: 16px;
      text-align: center;
    }

    > div[style*="border-radius"] {
      padding: 12px;
      margin: 16px 0;
    }
  }

  .sentinel-performance-grid,
  .sentinel-memory-insights .sentinel-performance-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .sentinel-performance-card {
    padding: 16px;

    h4 {
      font-size: 15px;
    }

    .sentinel-memory-stats {
      grid-template-columns: repeat(2, 1fr);
      gap: 10px;

      .sentinel-memory-stat {
        padding: 10px;

        .value {
          font-size: 18px;
        }

        .label {
          font-size: 11px;
        }
      }
    }
  }

  .sentinel-progress-bar {
    height: 8px;
    margin: 8px 0;
  }

  .sentinel-dashboard-widgets {
    grid-template-columns: 1fr;
  }

  .sentinel-widget {
    .sentinel-widget-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 12px;
    }
  }

  .sentinel-insights-grid {
    grid-template-columns: 1fr;
  }

  .sentinel-batch-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .sentinel-notification-pills {
    flex-direction: column;
    align-items: stretch;

    .sentinel-notification-pill label {
      justify-content: center;
    }
  }

  // Email notification toggles responsive
  .sentinel-email-card-grid {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;

    .sentinel-email-pill-toggle {
      width: 100%;

      label {
        justify-content: center;
        width: 100%;
      }
    }
  }

  .sentinel-export-options {
    grid-template-columns: 1fr;
  }

  .sentinel-modal {
    width: 95%;
    margin: 20px;

    .sentinel-modal-content {
      max-height: 50vh;
    }

    .sentinel-modal-footer {
      flex-direction: column;

      .sentinel-modal-btn {
        width: 100%;
      }
    }
  }
}

@media (max-width: 480px) {
  .sentinel-performance-status,
  .sentinel-memory-insights {
    padding: 12px;
    margin: 12px 0;

    h4 {
      font-size: 15px;
    }
  }

  .sentinel-performance-card {
    padding: 12px;

    h4 {
      font-size: 14px;
    }

    .sentinel-memory-stats {
      grid-template-columns: 1fr;
      gap: 8px;

      .sentinel-memory-stat {
        padding: 8px;

        .value {
          font-size: 16px;
        }

        .label {
          font-size: 10px;
        }
      }
    }
  }

  .sentinel-progress-bar {
    height: 6px;
    margin: 8px 0;
  }

  .sentinel-batch-metrics {
    grid-template-columns: 1fr;
  }

  .sentinel-segmented-control {
    width: 100%;

    label {
      flex: 1;
      text-align: center;
    }
  }
}

/* Print Styles (converted from CSS) */
@media print {
  .sentinel-modal-overlay,
  .sentinel-widget-actions,
  .sentinel-log-actions,
  .sentinel-export-controls {
    display: none !important;
  }

  .sentinel-dashboard,
  .sentinel-log-card,
  .sentinel-widget {
    box-shadow: none !important;
    border: 1px solid #000 !important;
  }
}

/* Premium Animations */
@keyframes premium-gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* API Key Management Styles */
.sentinel-api-key-container {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;

  #sentinel_api_key {
    flex: 1;
    min-width: 300px;
    font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
    font-size: 13px;
    background: #f8f9fa;
    border: 1px solid #d1d5db;
    padding: 8px 12px;
    border-radius: 6px;
    color: #374151;

    &::placeholder {
      color: #9ca3af;
      font-style: italic;
    }

    &:focus {
      outline: none;
      border-color: #2271b1;
      box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1);
      background: #ffffff;
    }
  }

  .sentinel-api-key-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;

    .button {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 8px 14px;
      font-size: 13px;
      font-weight: 500;
      border-radius: 6px;
      transition: all 0.2s ease;
      text-decoration: none;
      cursor: pointer;
      white-space: nowrap;

      .dashicons {
        font-size: 16px;
        line-height: 1;
        margin-right: 0;
      }

      &:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
      }

      &:active {
        transform: translateY(0);
      }

      &:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
      }

      &#generate-api-key {
        background: linear-gradient(135deg, #059669 0%, #047857 100%);
        border-color: #047857;
        color: #ffffff;

        &:hover {
          background: linear-gradient(135deg, #047857 0%, #065f46 100%);
          border-color: #065f46;
        }
      }

      &#copy-api-key {
        background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
        border-color: #1d4ed8;
        color: #ffffff;

        &:hover {
          background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
          border-color: #1e40af;
        }

        &.copied {
          background: linear-gradient(135deg, #059669 0%, #047857 100%);
          border-color: #047857;

          .dashicons {
            &::before {
              content: "\f147"; // checkmark icon
            }
          }
        }
      }

      &#regenerate-api-key {
        background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
        border-color: #d97706;
        color: #ffffff;

        &:hover {
          background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
          border-color: #b45309;
        }
      }
    }
  }
}

.sentinel-api-key-status {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;

  &.success {
    color: #065f46;

    &::before {
      content: "✓";
      color: #10b981;
      font-weight: bold;
    }
  }

  &.error {
    color: #991b1b;

    &::before {
      content: "✗";
      color: #ef4444;
      font-weight: bold;
    }
  }

  &.loading {
    color: #1f2937;

    &::before {
      content: "⟳";
      color: #3b82f6;
      animation: spin 1s linear infinite;
    }
  }

  &.info {
    color: #0369a1;

    &::before {
      content: "ℹ";
      color: #0ea5e9;
      font-weight: bold;
    }
  }
}

// Responsive design for API key management
@media (max-width: 768px) {
  .sentinel-api-key-container {
    flex-direction: column;
    align-items: stretch;

    #sentinel_api_key {
      min-width: auto;
      width: 100%;
    }

    .sentinel-api-key-actions {
      justify-content: flex-start;
      flex-wrap: wrap;

      .button {
        flex: 1;
        justify-content: center;
        min-width: 120px;
      }
    }
  }
}

@media (max-width: 480px) {
  .sentinel-api-key-container {
    .sentinel-api-key-actions {
      flex-direction: column;

      .button {
        width: 100%;
        text-align: center;
      }
    }
  }
}

/* Performance Monitor Buttons */
.sentinel-monitor-buttons {
  margin: 30px 0;

  h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1d2327;
    text-align: left;
  }
}

.sentinel-monitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.sentinel-monitor-card {
  background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
  border: 1px solid #c3c4c7;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;

  // Enabled state (default clickable behavior)
  &.enabled {
    cursor: pointer;

    &::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 4px;
      background: linear-gradient(90deg, #0073aa 0%, #005177 100%);
      transform: scaleX(0);
      transition: transform 0.3s ease;
    }

    &:hover {
      transform: translateY(-3px);
      border-color: #0073aa;
      box-shadow: 0 8px 20px rgba(0, 115, 170, 0.15);

      &::before {
        transform: scaleX(1);
      }

      .sentinel-monitor-action i {
        transform: translateX(4px);
        color: #0073aa;
      }
    }

    &:active {
      transform: translateY(-1px);
    }
  }

  // Disabled state with tooltip
  &.disabled {
    cursor: not-allowed;
    opacity: 0.6;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: #dee2e6;
    position: relative;

    .sentinel-monitor-icon {
      opacity: 0.5;
    }

    .sentinel-monitor-info h4 {
      color: #6c757d;
    }

    .sentinel-monitor-info p {
      color: #adb5bd;
    }

    .sentinel-monitor-status.inactive {
      background: #6c757d;
      color: white;
    }

    .sentinel-monitor-action i {
      color: #adb5bd;
    }

    // Override hover effects for disabled state
    &:hover {
      transform: none;
      border-color: #dee2e6;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);

      .sentinel-monitor-action i {
        transform: none;
        color: #adb5bd;
      }
    }
  }
}

.sentinel-monitor-icon {
  background: linear-gradient(135deg, #0073aa 0%, #005177 100%);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;

  i {
    color: #ffffff;
    font-size: 20px;
  }
}

.sentinel-monitor-info {
  flex: 1;

  h4 {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    line-height: 1.3;
  }

  p {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #50575e;
    line-height: 1.4;
  }
}

.sentinel-monitor-status {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 12px;

  &.active {
    background: #d1fae5;
    color: #065f46;
  }

  &.inactive {
    background: #fee2e2;
    color: #991b1b;
  }
}

.sentinel-monitor-action {
  color: #8c8f94;
  display: flex;
  align-items: center;

  i {
    font-size: 16px;
    transition: all 0.2s ease;
  }
}

// Monitor status badges
.sentinel-monitor-status {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;

  &.active {
    background: #d1e7dd;
    color: #0f5132;
  }

  &.inactive {
    background: #f8d7da;
    color: #842029;
  }
}

// JavaScript Tooltip Styles
.sentinel-tooltip {
  position: absolute;
  background: linear-gradient(135deg, #1d2327 0%, #23282d 100%);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  max-width: 300px;
  text-align: center;
  box-shadow:
    0 8px 25px rgba(0, 0, 0, 0.3),
    0 3px 10px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(5px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;

  // Arrow pointing up to the element
  &::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #1d2327;
  }

  &.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }

  // When tooltip is positioned above the element
  &.tooltip-above {
    &::before {
      top: auto;
      bottom: -6px;
      border-bottom: none;
      border-top: 6px solid #1d2327;
    }
  }

  // Responsive adjustments
  @media (max-width: 768px) {
    max-width: 250px;
    font-size: 12px;
    padding: 10px 14px;
  }
}

// Responsive adjustments
@media (max-width: 768px) {
  .sentinel-monitor-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .sentinel-monitor-card {
    padding: 20px;
    gap: 14px;
  }

  .sentinel-monitor-icon {
    width: 44px;
    height: 44px;

    i {
      font-size: 18px;
    }
  }
}

/* Performance Monitor Modals */
.sentinel-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(3px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  &.active {
    opacity: 1;
    visibility: visible;

    .sentinel-modal-container {
      transform: scale(1) translateY(0);
      opacity: 1;
    }
  }
}

.sentinel-modal-container {
  background: linear-gradient(145deg, #ffffff 0%, #fafbfc 100%);
  border-radius: 16px;
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.2);
  max-width: 92vw;
  max-height: 88vh;
  width: 900px;
  display: flex;
  flex-direction: column;
  transform: scale(0.85) translateY(-30px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.sentinel-modal-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-bottom: 1px solid #e1e5e9;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 16px 16px 0 0;
  position: relative;
  z-index: 2;

  h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #1d2327;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.02em;

    &::before {
      content: "📊";
      font-size: 20px;
      filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
    }
  }
}

.sentinel-modal-close {
  background: transparent;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 12px;
  border-radius: 50%;
  color: #50575e;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  position: relative;

  &:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.2);
    color: #dc2626;
    transform: scale(1.05);
  }

  &:active {
    background: rgba(220, 38, 38, 0.2);
    transform: scale(0.95);
  }

  .dashicons {
    font-size: 20px;
    font-weight: 600;
  }
}

.sentinel-modal-content {
  padding: 32px 36px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  background: #ffffff;

  // Custom scrollbar styling
  &::-webkit-scrollbar {
    width: 8px;
  }

  &::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
  }

  &::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;

    &:hover {
      background: #a8a8a8;
    }
  }

  // Override existing performance styles for modal context
  .sentinel-performance-status,
  .sentinel-memory-insights {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;

    // Remove the blue gradient line from modal context
    &::before {
      display: none !important;
    }

    > h4 {
      display: none; // Hide duplicate headers since we have modal title
    }
  }

  .sentinel-performance-grid {
    margin-top: 0;
    gap: 24px;

    @media (max-width: 768px) {
      grid-template-columns: 1fr;
      gap: 20px;
    }
  }

  // Enhanced performance card styling for modals
  .sentinel-performance-card {
    background: linear-gradient(145deg, #fafbfc 0%, #ffffff 100%);
    border: 1px solid rgba(0, 115, 170, 0.1);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow:
      0 2px 8px rgba(0, 0, 0, 0.04),
      0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;

    &:hover {
      transform: translateY(-2px);
      border-color: rgba(0, 115, 170, 0.2);
      box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.08),
        0 4px 8px rgba(0, 115, 170, 0.1);
    }

    h4 {
      font-size: 18px;
      font-weight: 700;
      color: #1d2327;
      margin: 0 0 16px 0;
      letter-spacing: -0.01em;
      display: flex;
      align-items: center;
      gap: 8px;

      .emoji {
        font-size: 20px;
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
      }
    }

    p {
      font-size: 15px;
      line-height: 1.6;
      color: #4b5563;
      margin-bottom: 12px;

      &:last-child {
        margin-bottom: 0;
      }

      strong {
        color: #1d2327;
        font-weight: 600;
      }
    }
  }

  // Enhanced progress bars in modals
  .sentinel-progress-bar {
    background: #f3f4f6;
    border-radius: 8px;
    height: 12px;
    overflow: hidden;
    margin: 16px 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);

    .sentinel-progress-fill {
      height: 100%;
      border-radius: 8px;
      transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;

      &::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        background: linear-gradient(
          90deg,
          rgba(255, 255, 255, 0.2) 0%,
          rgba(255, 255, 255, 0) 50%,
          rgba(255, 255, 255, 0.2) 100%
        );
        animation: shimmer 2s infinite;
      }

      &.good {
        background: linear-gradient(90deg, #10b981 0%, #059669 100%);
      }

      &.warning {
        background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
      }

      &.critical {
        background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
      }
    }
  }

  @keyframes shimmer {
    0% {
      transform: translateX(-100%);
    }
    50% {
      transform: translateX(100%);
    }
    100% {
      transform: translateX(100%);
    }
  }

  // Enhanced memory stats layout
  .sentinel-memory-stats,
  .sentinel-batch-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin: 20px 0;

    @media (max-width: 480px) {
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
    }
  }

  .sentinel-memory-stat,
  .sentinel-batch-stat {
    text-align: center;
    padding: 16px 12px;
    background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    transition: all 0.3s ease;

    &:hover {
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
      border-color: rgba(0, 115, 170, 0.3);
    }

    .value {
      font-size: 20px;
      font-weight: 700;
      color: #1e293b;
      margin-bottom: 4px;
      line-height: 1.2;
    }

    .label {
      font-size: 12px;
      color: #64748b;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
  }
}

.sentinel-modal-loading {
  text-align: center;
  padding: 40px 20px;
  color: #50575e;

  p {
    margin: 15px 0 0 0;
    font-style: italic;
  }
}

.sentinel-loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e1e5e9;
  border-top: 3px solid #0073aa;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

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

// Responsive modal design
@media (max-width: 768px) {
  .sentinel-modal-container {
    width: 95vw;
    max-height: 95vh;
    margin: 20px;
  }

  .sentinel-modal-header {
    padding: 16px 20px;

    h2 {
      font-size: 16px;
    }
  }

  .sentinel-modal-content {
    padding: 20px;
  }
}

// Mobile responsive improvements
@media (max-width: 768px) {
  .sentinel-modal-container {
    width: 95vw;
    max-height: 85vh;
  }

  .sentinel-modal-header {
    padding: 24px;

    h2 {
      font-size: 20px;

      &::before {
        font-size: 18px;
      }
    }
  }

  .sentinel-modal-content {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .sentinel-modal-container {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    border-radius: 0;
    margin: 0;
  }

  .sentinel-modal-header {
    padding: 20px;
    border-radius: 0;

    h2 {
      font-size: 18px;
    }

    &::before {
      border-radius: 0;
    }
  }

  .sentinel-modal-content {
    padding: 20px;
  }

  .sentinel-performance-card {
    padding: 20px;
    margin-bottom: 16px;

    h4 {
      font-size: 16px;
      margin-bottom: 12px;
    }

    p {
      font-size: 14px;
    }
  }

  .sentinel-modal-close {
    width: 40px;
    height: 40px;
    padding: 10px;

    .dashicons {
      font-size: 18px;
    }
  }
}

// Modal body scroll prevention
body.modal-open {
  overflow: hidden;
}

/* 3rd Party Plugin Integrations Styles */
.sentinel-plugin-integrations {
  .sentinel-no-plugins {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;

    .sentinel-no-plugins-icon {
      font-size: 48px;
      margin-bottom: 16px;
      opacity: 0.7;
    }

    h4 {
      color: #374151;
      font-size: 18px;
      font-weight: 600;
      margin: 0 0 8px 0;
    }

    p {
      margin: 0;
      line-height: 1.5;
    }
  }

  // Reuse existing template styles but ensure they work in plugin integrations context
  .sentinel-templates-section {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px; // Add margin for separation from plugin events

    h4 {
      color: #0369a1;
      font-size: 16px;
      font-weight: 600;
      margin: 0 0 8px 0;
      display: flex;
      align-items: center;
      gap: 8px;

      &::before {
        content: "🔌";
        font-size: 18px;
      }
    }

    > p {
      color: #0c4a6e;
      margin-bottom: 20px;
      line-height: 1.5;
    }
  }

  .sentinel-templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }

  .sentinel-template-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);

    &:hover {
      border-color: #0ea5e9;
      box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
      transform: translateY(-1px);
    }

    .sentinel-template-header {
      background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
      color: white;
      padding: 15px 20px;
      display: flex;
      justify-content: space-between;
      align-items: center;

      h5 {
        margin: 0;
        font-size: 16px;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 8px;
      }

      .sentinel-plugin-badge {
        background: rgba(255, 255, 255, 0.2);
        color: white;
        padding: 4px 8px;
        border-radius: 12px;
        font-size: 11px;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
      }
    }

    .sentinel-template-body {
      padding: 20px;

      p {
        color: #6b7280;
        margin-bottom: 15px;
        line-height: 1.5;
      }

      .sentinel-template-events {
        list-style: none;
        margin: 0 0 20px 0;
        padding: 0;

        li {
          padding: 8px 0;
          border-bottom: 1px solid #f3f4f6;
          color: #374151;
          font-size: 14px;
          display: flex;
          align-items: center;
          line-height: 1.4;

          &::before {
            content: "✓";
            color: #10b981;
            font-weight: bold;
            margin-right: 10px;
            font-size: 12px;
          }

          &:last-child {
            border-bottom: none;
          }
        }
      }

      .sentinel-template-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
      }

      .sentinel-template-partial {
        text-align: center;
        padding: 12px;
        background: #fffbeb;
        border: 1px solid #fed7aa;
        border-radius: 6px;

        .sentinel-partial-badge {
          display: inline-flex;
          align-items: center;
          gap: 6px;
          color: #92400e;
          font-weight: 600;
          font-size: 14px;
          margin-bottom: 8px;
        }

        .sentinel-partial-details {
          color: #a16207;
          font-size: 12px;
          line-height: 1.4;
          margin-bottom: 8px;

          .button {
            font-size: 11px;
            padding: 4px 8px;
            height: auto;
            line-height: 1.2;
            margin-top: 6px;
            background: #f59e0b;
            border-color: #f59e0b;
            color: white;

            &:hover {
              background: #d97706;
              border-color: #d97706;
            }
          }
        }
      }

      .sentinel-setup-template {
        width: 100%;
        background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
        border: none;
        color: white;
        padding: 12px 20px;
        border-radius: 6px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
        font-size: 14px;

        &:hover {
          background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
          transform: translateY(-1px);
          box-shadow: 0 4px 8px rgba(14, 165, 233, 0.3);
        }

        &:disabled {
          opacity: 0.6;
          cursor: not-allowed;
          transform: none;
          background: #9ca3af;
        }
      }

      .sentinel-template-status {
        min-height: 20px;
        font-size: 13px;
        padding: 6px 0;
        display: flex;
        align-items: center;
        gap: 6px;

        &.success {
          color: #065f46;

          &::before {
            content: "✓";
            color: #10b981;
            font-weight: bold;
          }
        }

        &.error {
          color: #991b1b;

          &::before {
            content: "✗";
            color: #ef4444;
            font-weight: bold;
          }
        }

        &.loading {
          color: #1f2937;

          &::before {
            content: "⟳";
            color: #0ea5e9;
            animation: spin 1s linear infinite;
          }
        }
      }
    }
  }

  // Responsive design for plugin integrations
  @media (max-width: 768px) {
    .sentinel-templates-grid {
      grid-template-columns: 1fr;
      gap: 16px;
    }

    .sentinel-template-card {
      .sentinel-template-header {
        padding: 12px 16px;

        h5 {
          font-size: 15px;
        }
      }

      .sentinel-template-body {
        padding: 16px;
      }
    }
  }
}

/* Custom Events Management Styles */
.sentinel-custom-events {
  // Quick Setup Templates
  .sentinel-templates-section {
    background: #f8f9ff;
    border: 1px solid #e0e6ff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;

    h4 {
      color: #374151;
      font-size: 16px;
      font-weight: 600;
      margin: 0 0 8px 0;
      display: flex;
      align-items: center;
      gap: 8px;

      &::before {
        content: "⚡";
        font-size: 18px;
      }
    }

    > p {
      color: #6b7280;
      margin-bottom: 20px;
      line-height: 1.5;
    }
  }

  .sentinel-templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }

  .sentinel-template-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;

    &:hover {
      border-color: #2563eb;
      box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    .sentinel-template-header {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
      padding: 15px 20px;
      display: flex;
      justify-content: space-between;
      align-items: center;

      h5 {
        margin: 0;
        font-size: 16px;
        font-weight: 600;
      }

      .sentinel-plugin-badge {
        background: rgba(255, 255, 255, 0.2);
        color: white;
        padding: 4px 8px;
        border-radius: 12px;
        font-size: 11px;
        font-weight: 500;
      }
    }

    .sentinel-template-body {
      padding: 20px;

      p {
        color: #6b7280;
        margin-bottom: 15px;
        line-height: 1.5;
      }

      .sentinel-template-events {
        list-style: none;
        margin: 0 0 20px 0;
        padding: 0;

        li {
          padding: 6px 0;
          border-bottom: 1px solid #f3f4f6;
          color: #374151;
          font-size: 14px;
          display: flex;
          align-items: center;

          &::before {
            content: "✓";
            color: #059669;
            font-weight: bold;
            margin-right: 8px;
          }

          &:last-child {
            border-bottom: none;
          }
        }
      }

      .sentinel-template-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
      }

      // Template configured states

      .sentinel-template-partial {
        text-align: center;
        padding: 12px;
        background: #fffbeb;
        border: 1px solid #fed7aa;
        border-radius: 6px;

        .sentinel-partial-badge {
          display: inline-flex;
          align-items: center;
          gap: 6px;
          color: #92400e;
          font-weight: 600;
          font-size: 14px;
          margin-bottom: 8px;
        }

        .sentinel-partial-details {
          color: #a16207;
          font-size: 12px;
          line-height: 1.4;
          margin-bottom: 8px;

          .button {
            font-size: 11px;
            padding: 4px 8px;
            height: auto;
            line-height: 1.2;
            margin-top: 6px;
          }
        }
      }

      .sentinel-setup-template {
        width: 100%;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border: none;
        color: white;
        padding: 12px 20px;
        border-radius: 6px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;

        &:hover {
          transform: translateY(-1px);
          box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
        }

        &:disabled {
          opacity: 0.6;
          cursor: not-allowed;
          transform: none;
        }
      }

      .sentinel-template-status {
        min-height: 20px;
        font-size: 13px;
        padding: 6px 0;
        display: flex;
        align-items: center;
        gap: 6px;

        // Success state
        &.success {
          color: #065f46;

          &::before {
            content: "✓";
            color: #059669;
            font-weight: bold;
          }
        }

        // Error state
        &.error {
          color: #991b1b;

          &::before {
            content: "✗";
            color: #dc2626;
            font-weight: bold;
          }
        }

        // Loading state
        &.loading {
          color: #1f2937;

          &::before {
            content: "⟳";
            color: #3b82f6;
            animation: spin 1s linear infinite;
          }
        }
      }

      // Spin animation for loading state
      @keyframes spin {
        from {
          transform: rotate(0deg);
        }
        to {
          transform: rotate(360deg);
        }
      }
    }
  }

  .sentinel-no-templates,
  .sentinel-all-configured {
    text-align: center;
    padding: 40px 20px;

    p {
      margin: 0;
    }

    .dashicons {
      font-size: 20px;
      vertical-align: middle;
      margin-right: 8px;
    }
  }
}

// Event table loading state (both custom and system events)
.sentinel-updating {
  opacity: 0.6;
  transition: opacity 0.3s ease;

  .sentinel-toggle-switch {
    pointer-events: none;
  }
}

// Apply loading state to both main events table and custom events table
.wp-list-table .sentinel-updating,
.sentinel-events-table .sentinel-updating {
  opacity: 0.6;
  transition: opacity 0.3s ease;

  .sentinel-toggle-switch {
    pointer-events: none;
  }
}

.sentinel-custom-events {
  // Ensure custom events table matches system events styling
  .sentinel-events-table {
    .wp-list-table {
      border: 1px solid #c3c4c7;

      // Disabled event styling for custom events
      .sentinel-event-disabled {
        opacity: 0.5;
        background-color: #f6f7f7;

        code.sentinel-event-key {
          color: #787c82;
        }
      }
    }
  }
  .sentinel-custom-events-form {
    background: #f8fafc;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    border-left: 4px solid #2271b1;

    h4 {
      color: #374151;
      font-size: 16px;
      font-weight: 600;
      margin: 0 0 16px 0;
      display: flex;
      align-items: center;
      gap: 8px;

      &::before {
        content: "⚙️";
        font-size: 18px;
      }
    }

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

    .sentinel-form-group {
      display: flex;
      flex-direction: column;
      gap: 6px;

      label {
        font-weight: 600;
        color: #374151;
        font-size: 14px;
        margin: 0;
      }

      input,
      select,
      textarea {
        padding: 8px 12px;
        border: 1px solid #d1d5db;
        border-radius: 6px;
        font-size: 14px;
        background: #fff;
        transition: border-color 0.2s;

        &:focus {
          outline: none;
          border-color: #2271b1;
          box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1);
        }
      }

      textarea {
        resize: vertical;
        min-height: 60px;
      }

      small {
        color: #6b7280;
        font-size: 12px;
        margin-top: 2px;
      }
    }

    .sentinel-form-actions {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-top: 16px;
    }
  }

  .sentinel-add-event-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #2271b1;
    border: 1px solid #2271b1;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;

    &:hover {
      background: #1a5490;
      border-color: #1a5490;
      transform: translateY(-1px);
    }

    .dashicons {
      font-size: 16px;
      line-height: 1;
    }
  }

  .sentinel-status-message {
    margin-left: 10px;
    font-size: 14px;
    font-weight: 500;

    &.success {
      color: #059669;
    }

    &.error {
      color: #dc2626;
    }

    &.loading {
      color: #0891b2;
    }
  }

  .sentinel-custom-events-list {
    h3 {
      color: #374151;
      font-size: 18px;
      font-weight: 600;
      margin: 0 0 16px 0;
      display: flex;
      align-items: center;
      gap: 8px;

      &::before {
        content: "📝";
        font-size: 16px;
      }
    }
  }

  .sentinel-events-container {
    .sentinel-loading-events {
      color: #6b7280;
      font-style: italic;
      text-align: center;
      padding: 20px;
    }

    .sentinel-no-events {
      color: #6b7280;
      text-align: center;
      padding: 20px;
      font-style: italic;
    }

    .sentinel-event-item {
      background: #fff;
      border: 1px solid #e5e7eb;
      border-radius: 8px;
      padding: 16px;
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      transition: all 0.2s ease;

      &:hover {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        border-color: #2271b1;
      }

      .sentinel-event-info {
        flex: 1;

        .sentinel-event-name {
          font-weight: 600;
          color: #111827;
          font-size: 16px;
          margin-bottom: 4px;
        }

        .sentinel-event-meta {
          display: flex;
          align-items: center;
          gap: 12px;
          font-size: 13px;

          .sentinel-event-key-display {
            font-family: monospace;
            background: #f3f4f6;
            padding: 2px 6px;
            border-radius: 4px;
            color: #6b7280;
          }

          .sentinel-event-category,
          .sentinel-event-priority {
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
          }
        }

        .sentinel-event-description {
          color: #6b7280;
          font-size: 14px;
          margin-top: 8px;
          line-height: 1.4;
        }
      }

      .sentinel-event-actions {
        display: flex;
        gap: 8px;

        .sentinel-remove-event-btn {
          padding: 6px 12px;
          background: #dc2626;
          border: 1px solid #dc2626;
          color: #fff;
          border-radius: 4px;
          font-size: 12px;
          cursor: pointer;
          transition: all 0.2s ease;

          &:hover {
            background: #b91c1c;
            border-color: #b91c1c;
          }
        }
      }
    }
  }
}

// Responsive design for custom events
@media (max-width: 768px) {
  .sentinel-custom-events {
    .sentinel-custom-events-form {
      .sentinel-form-grid {
        grid-template-columns: 1fr;
      }

      .sentinel-form-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
      }
    }

    .sentinel-events-container {
      .sentinel-event-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;

        .sentinel-event-actions {
          justify-content: flex-end;
        }
      }
    }
  }
  // Plugin Events Section Styling
  .sentinel-plugin-events {
    margin-top: 20px;

    .sentinel-plugin-category {
      background: #ffffff;
      border: 1px solid #e5e7eb;
      border-radius: 8px;
      margin-bottom: 20px;
      overflow: hidden;

      &:last-child {
        margin-bottom: 0;
      }

      .sentinel-plugin-category-header {
        background: #f8fafc;
        border-bottom: 1px solid #e5e7eb;
        padding: 16px 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;

        h4 {
          color: #374151;
          font-size: 16px;
          font-weight: 600;
          margin: 0;
          display: flex;
          align-items: center;
          gap: 8px;
        }

        .sentinel-event-count {
          background: #3b82f6;
          color: white;
          font-size: 12px;
          font-weight: 500;
          padding: 4px 8px;
          border-radius: 12px;
          line-height: 1;
        }
      }
    }
  }
}
// Incidents Dashboard Widget and Page Styles
.sentinel-incidents-widget {
  .sentinel-incidents-overview {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
  }

  .sentinel-stat-card {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
    position: relative;

    .stat-number {
      font-size: 24px;
      font-weight: bold;
      color: #23282d;
    }

    .stat-label {
      font-size: 12px;
      color: #666;
      margin-top: 2px;
    }

    .stat-alert,
    .stat-good {
      position: absolute;
      top: 5px;
      right: 5px;
      font-size: 16px;
    }
  }

  .sentinel-recent-incidents {
    h4 {
      margin: 15px 0 10px 0;
      font-size: 14px;
    }

    .incident-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 8px 0;
      border-bottom: 1px solid #eee;

      &:last-child {
        border-bottom: none;
      }

      .incident-type {
        font-weight: bold;
        color: #d63638;
      }

      .incident-details {
        display: flex;
        gap: 10px;
        align-items: center;

        .incident-ip {
          font-family: monospace;
          background: #f0f0f0;
          padding: 2px 6px;
          border-radius: 3px;
          font-size: 12px;
        }

        .incident-confidence {
          padding: 2px 6px;
          border-radius: 3px;
          font-size: 11px;
          font-weight: bold;

          &.confidence-low {
            background: #fff3cd;
            color: #856404;
          }

          &.confidence-medium {
            background: #f8d7da;
            color: #721c24;
          }

          &.confidence-high {
            background: #d1ecf1;
            color: #0c5460;
          }
        }
      }

      .incident-time {
        font-size: 12px;
        color: #666;
      }
    }
  }

  .sentinel-incidents-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
  }

  .sentinel-no-incidents {
    text-align: center;
    padding: 20px;
    color: #46b450;
  }
}

// Incidents Page Styles (following events page structure)
.sentinel-incidents-stats {
  display: flex;
  gap: 20px;
  margin: 20px 0;

  .sentinel-stat-card {
    flex: 1;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;

    .stat-number {
      font-size: 32px;
      font-weight: bold;
      color: #23282d;
      display: block;
    }

    .stat-label {
      color: #666;
      font-size: 14px;
      margin-top: 5px;
    }
  }
}

// Enhanced summary stats with alert indicators
.sentinel-summary-stat {
  position: relative;

  .stat-alert,
  .stat-good {
    margin-left: 8px;
    font-size: 14px;
    vertical-align: middle;
  }
}

// Simple Incident Actions
.incident-actions {
  position: relative;

  .actions-dropdown-toggle {
    background: #0073aa;
    color: white;
    border: none;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 3px;
    cursor: pointer;

    &:hover {
      background: #005a87;
    }
  }

  .actions-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-radius: 3px;
    min-width: 150px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);

    &.show {
      display: block;
    }

    a,
    button {
      display: block;
      padding: 8px 12px;
      text-decoration: none;
      color: #333;
      border: none;
      background: none;
      text-align: left;
      cursor: pointer;
      font-size: 13px;

      &:hover {
        background: #f5f5f5;
      }

      &.danger {
        color: #d63384;
      }
    }
  }
}

// Ensure table cells don't clip dropdowns
.incidents-table td:last-child {
  overflow: visible;
}

// Incident Status Badges
.incident-status {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;

  &.status-open {
    background: #fef2f2;
    color: #dc2626;
  }

  &.status-resolved {
    background: #f0fdf4;
    color: #16a34a;
  }
}

.incident-confidence {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;

  &.confidence-low {
    background: #fef3c7;
    color: #d97706;
  }

  &.confidence-medium {
    background: #fef2f2;
    color: #dc2626;
  }

  &.confidence-high {
    background: #dbeafe;
    color: #2563eb;
  }
}

.incident-type {
  font-weight: 500;
  color: #374151;

  &.type-bruteforce {
    color: #dc2626;
  }

  &.type-enumeration {
    color: #d97706;
  }

  &.type-xmlrpc_flood {
    color: #2563eb;
  }
}

// Incident Details Modal
.incident-modal {
  .modal-content {
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;

    .incident-details {
      .detail-section {
        margin-bottom: 20px;

        h4 {
          margin: 0 0 10px 0;
          color: #374151;
          font-size: 16px;
          border-bottom: 1px solid #e5e7eb;
          padding-bottom: 5px;
        }

        .detail-grid {
          display: grid;
          grid-template-columns: 1fr 1fr;
          gap: 15px;

          .detail-item {
            .label {
              font-weight: 500;
              color: #6b7280;
              font-size: 12px;
              text-transform: uppercase;
              margin-bottom: 2px;
            }

            .value {
              color: #111827;
              font-size: 14px;
            }
          }
        }

        .meta-data {
          background: #f8f9fa;
          border: 1px solid #e5e7eb;
          border-radius: 6px;
          padding: 15px;

          pre {
            margin: 0;
            font-size: 12px;
            color: #374151;
            white-space: pre-wrap;
            word-break: break-word;
          }
        }
      }
    }
  }
}

/* File Monitor Diff Viewer (Sentinel+ Feature) */
.sentinel-diff-btn {
  display: inline-block;
  margin-left: 8px;
  padding: 4px 8px;
  background: #0073aa;
  color: white;
  border: none;
  border-radius: 3px;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;

  // Icon button specific styles
  &.sentinel-btn-small {
    padding: 6px 8px;
    margin-left: 4px;
  }

  &:hover {
    background: #005a87;
    color: white;
  }

  &:disabled {
    background: #ccc;
    cursor: not-allowed;
  }
}

.sentinel-diff-viewer {
  margin: 15px 24px; // Match log-details padding to prevent edge-to-edge
  background: #f9fafb; // Match log-details background
  border-top: 1px solid #e5e7eb; // Match log-details border
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);

  .sentinel-diff-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: transparent;

    h4 {
      margin: 0 0 8px 0;
      color: #374151; // Match log-details text color
      font-size: 16px;
      font-weight: 600;
    }

    .sentinel-diff-meta {
      margin: 0;
      font-size: 13px;
      color: #6b7280;
    }
  }

  .sentinel-diff-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    background: #f3f4f6;

    .sentinel-diff-tab {
      padding: 12px 20px;
      background: none;
      border: none;
      cursor: pointer;
      font-size: 14px;
      color: #6b7280;
      border-bottom: 2px solid transparent;
      font-weight: 500;

      &:hover {
        background: #e5e7eb;
        color: #374151;
      }

      &.active {
        color: #0073aa;
        border-bottom-color: #0073aa;
        background: #f9fafb;
      }
    }
  }

  .sentinel-diff-content {
    position: relative;
    padding: 20px;

    .sentinel-diff-pane {
      display: none;

      &.active {
        display: block;
      }
    }

    .sentinel-diff-code {
      // Match sentinel-raw-data styling exactly
      background: #1f2937;
      color: #f9fafb;
      padding: 16px;
      border-radius: 6px;
      font-size: 12px;
      line-height: 1.5;
      overflow-x: auto;
      white-space: pre-wrap;
      word-break: break-word;
      margin: 0;
      border: none;
      font-family: "Courier New", Consolas, monospace;
      max-height: 400px;
      overflow-y: auto;

      // Enhanced diff syntax highlighting for dark theme
      .diff-line-added {
        background-color: rgba(34, 197, 94, 0.2);
        color: #86efac;
      }

      .diff-line-removed {
        background-color: rgba(239, 68, 68, 0.2);
        color: #fca5a5;
      }

      .diff-line-modified {
        background-color: rgba(245, 158, 11, 0.2);
        color: #fcd34d;
      }

      .diff-line-context {
        color: #d1d5db;
      }

      // Diff headers
      .diff-header {
        color: #60a5fa;
        font-weight: bold;
      }
    }
  }
}

// Loading animation for diff buttons
.sentinel-spin {
  animation: sentinel-spin 1s linear infinite;
}

@keyframes sentinel-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

// Make diff viewer responsive
@media (max-width: 768px) {
  .sentinel-diff-viewer {
    margin: 15px 12px; // Reduce margin on mobile

    .sentinel-diff-header {
      padding: 12px 16px;

      h4 {
        font-size: 14px;
      }
    }

    .sentinel-diff-tabs {
      flex-direction: column;

      .sentinel-diff-tab {
        text-align: left;
        padding: 10px 16px;
        border-bottom: 1px solid #e5e7eb;
        border-right: none;

        &.active {
          border-bottom-color: #e5e7eb;
          border-left: 3px solid #0073aa;
        }
      }
    }

    .sentinel-diff-content {
      padding: 16px;

      .sentinel-diff-code {
        font-size: 11px;
        max-height: 250px;
        padding: 12px;
      }
    }
  }
}

.test {
  #test {
    background-color: red;
  }
}

// ✅ SCSS Conversion Complete!
// Original CSS: 2,904 lines → Organized SCSS: 3,000+ lines
// All sections successfully converted with improved organization and maintainability
