/* Extracted from feed_editor.html */

    .feed-container {
      background: white;
      padding: 1.5rem;
      border-radius: 8px;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
      margin-top: 1rem;
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
    }

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

    .feed-selector select {
      padding: 8px;
      border: 1px solid #ccc;
      border-radius: 4px;
      font-size: 1rem;
      min-width: 250px;
    }

    .btn {
      padding: 8px 16px;
      border: none;
      border-radius: 4px;
      background-color: #0056b3;
      color: white;
      cursor: pointer;
      font-size: 0.9rem;
      font-weight: 500;
    }

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

    .btn-export {
      background-color: #f39c12;
    }

    .btn-settings {
      background-color: #6c757d;
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .table-wrapper {
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
      overflow-x: auto;
      border: 1px solid #eee;
      border-radius: 4px;
      max-height: 65vh;
    }

    table.csv-table {
      width: 100%;
      border-collapse: collapse;
      white-space: nowrap;
    }

    .csv-table th,
    .csv-table td {
      border: 1px solid #dee2e6;
      padding: 8px 12px;
      text-align: left;
      font-size: 0.9rem;
    }

    .csv-table th {
      background-color: #e9ecef;
      position: sticky;
      top: 0;
      z-index: 10;
      box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
    }

    .resizer {
      position: absolute;
      top: 0;
      right: 0;
      width: 6px;
      cursor: col-resize;
      user-select: none;
      height: 100%;
      z-index: 20;
    }
    
    .resizer:hover,
    .resizing {
      background-color: #0056b3;
    }

    /* Greyed-out filter inputs in header */
    .csv-table th .col-filter {
      width: 100%;
      box-sizing: border-box;
      padding: 6px;
      font-size: 0.85rem;
      border: 1px solid #ddd;
      border-radius: 4px;
      background: #fdfdfd;
      color: #777;
    }

    .csv-table th .col-filter:focus {
      background: #fff;
      color: #333;
      border-color: #0056b3;
      outline: none;
      box-shadow: 0 0 0 2px rgba(0, 86, 179, 0.25);
    }

    .csv-table th .col-filter::placeholder {
      color: #999;
      font-weight: 500;
    }

    /* Long text truncation logic */
    .csv-table td {
      max-width: 250px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .editable-cell {
      background-color: #fffacd;
      cursor: cell;
    }

    .editable-cell:focus {
      outline: 2px solid #0056b3;
      background-color: #fff;
    }

    .col-hidden {
      display: none !important;
    }

    .row-highlight {
      background-color: rgba(0, 86, 179, 0.06) !important;
    }

    /* Right-Click Context Menu */
    .context-menu {
      display: none;
      position: fixed;
      z-index: 3000;
      background: #fff;
      border: 1px solid #ccc;
      border-radius: 6px;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
      min-width: 200px;
      padding: 6px 0;
    }

    .context-menu .ctx-item {
      padding: 9px 18px;
      cursor: pointer;
      font-size: 0.9rem;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .context-menu .ctx-item:hover {
      background: #e9ecef;
    }

    .context-menu .ctx-divider {
      height: 1px;
      background: #eee;
      margin: 4px 0;
    }

    /* Sidebar Settings */
    .sidebar-overlay {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.5);
      z-index: 1040;
    }

    .settings-sidebar {
      position: fixed;
      top: 0;
      right: -400px;
      width: 350px;
      height: 100vh;
      background: #fff;
      box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
      z-index: 1050;
      transition: right 0.3s ease;
      display: flex;
      flex-direction: column;
    }

    .settings-sidebar.open {
      right: 0;
    }

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

    .sidebar-content {
      padding: 1.5rem;
      overflow-y: auto;
      flex: 1;
    }

    .sidebar-section {
      margin-bottom: 2rem;
      padding-bottom: 1rem;
      border-bottom: 1px solid #eee;
    }

    .sidebar-section h4 {
      margin-top: 0;
      margin-bottom: 1rem;
      color: #333;
    }

    .toggle-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .toggle-list label {
      font-size: 0.85rem;
      display: flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
    }

    .toggle-list label.is-empty-col {
      color: #aaa;
    }

    /* Edit Modal */
    .modal-overlay {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.5);
      z-index: 2000;
      justify-content: center;
      align-items: center;
    }

    .modal-content {
      background: white;
      padding: 0;
      border-radius: 8px;
      width: 95vw;
      max-width: 1600px;
      height: 95vh;
      display: flex;
      flex-direction: column;
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
      resize: both;
      overflow: auto;
    }

    .modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid #eee;
      padding: 1.5rem 2rem 1rem 2rem;
      margin-bottom: 0;
      flex-shrink: 0;
      background: white;
    }

    .form-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1rem;
    }

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

    .form-group label {
      font-size: 0.85rem;
      font-weight: 500;
      margin-bottom: 4px;
      color: #555;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
      padding: 8px;
      border: 1px solid #ccc;
      border-radius: 4px;
      font-family: inherit;
      font-size: 0.9rem;
    }

    .form-group textarea {
      resize: vertical;
      min-height: 80px;
    }

    .tooltip-icon {
      display: inline-flex;
      justify-content: center;
      align-items: center;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: #e9ecef;
      color: #555;
      font-size: 0.65rem;
      font-weight: bold;
      cursor: help;
      margin-left: 5px;
    }

    /* Image Lightbox */
    .lightbox-overlay {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.85);
      z-index: 9999;
      top: 0; left: 0; width: 100vw; height: 100vh;
      background: rgba(0,0,0,0.8);
      z-index: 3000;
      justify-content: center;
      align-items: center;
    }
    .lightbox-img {
      max-width: 90%;
      max-height: 90%;
      border-radius: 8px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.5);
      object-fit: contain;
      background: white;
    }
    
    /* Tab Styles */
    .tab-nav {
      display: flex;
      border-bottom: 2px solid #ddd;
      margin-bottom: 0px;
      background: #fff;
    }
    .tab-btn {
      padding: 10px 20px;
      background: #f8f9fa;
      border: none;
      border-bottom: 2px solid transparent;
      margin-bottom: -2px;
      cursor: pointer;
      font-weight: 500;
      color: #555;
      outline: none;
    }
    .tab-btn:hover {
      background: #e2e6ea;
    }
    .tab-btn.active {
      background: #fff;
      color: #007bff;
      border-bottom: 2px solid #007bff;
    }
    .tab-pane {
      display: none;
    }
    .tab-pane.active {
      display: flex;
    }

    .pagination-bar {
      display: flex;
      justify-content: center;
      gap: 30px;
      align-items: center;
      padding: 15px 0;
      margin-top: 10px;
      border-top: 1px solid #eee;
    }

    .empty-col-toggle {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 0.85rem;
      color: #666;
      cursor: pointer;
    }
    /* Global HTML Tooltip */
    #html-tooltip {
      position: fixed;
      z-index: 9999;
      background: white;
      border: 1px solid #ccc;
      box-shadow: 0 6px 16px rgba(0,0,0,0.2);
      border-radius: 4px;
      padding: 15px;
      max-width: 800px;
      max-height: 600px;
      overflow-y: auto;
      display: none;
      font-size: 0.85rem;
      color: #333;
      pointer-events: none;
    }
  
