 * {
     margin: 0;
     padding: 0;
     box-sizing: border-box;
     font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
 }

 body {
     background-color: #f5f9fc;
     color: #333;
 }

 .container {
     width: 100%;
     /* max-width: 2400px; */
     max-width: 2200px;
     margin: 0 auto;
     padding: 15px;
 }

 .dq-header {
     background-color: #fff;
     border-radius: 8px;
     padding: 15px;
     margin-bottom: 15px;
     box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
     border-left: 4px solid #1a8cff;
 }

 .dq-header h1 {
     color: #0056b3;
     margin-bottom: 20px;
     font-size: 22px;
     display: flex;
     align-items: center;
 }

 .dq-header h1 i {
     margin-right: 10px;
     color: #1a8cff;
 }

 .query-panel {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
     gap: 15px;
 }

 .query-category {
     background-color: #f8fafc;
     padding: 15px;
     border-radius: 6px;
     border: 1px solid #e1e8f0;
     min-height: 160px;
     display: flex;
     flex-direction: column;
 }

 .category-header {
     display: flex;
     justify-content: space-between;
     align-items: center;
     margin-bottom: 12px;
     padding-bottom: 8px;
     border-bottom: 1px dashed #d1d9e6;
 }

 .category-title {
     font-weight: 600;
     color: #2c3e50;
     font-size: 15px;
 }

 .category-count {
     background-color: #e6f2ff;
     color: #1a8cff;
     padding: 2px 8px;
     border-radius: 10px;
     font-size: 12px;
     font-weight: 600;
 }

 .selected-values {
     flex-grow: 1;
     min-height: 50px;
     max-height: 80px;
     overflow-y: auto;
     padding: 8px;
     background-color: white;
     border-radius: 4px;
     border: 1px solid #e1e8f0;
     margin-bottom: 10px;
 }

 .selected-tag {
     display: inline-flex;
     align-items: center;
     background-color: #e6f2ff;
     color: #1a8cff;
     padding: 3px 8px;
     border-radius: 4px;
     margin: 2px;
     font-size: 12px;
     max-width: 100%;
     word-break: break-all;
 }

 .remove-tag {
     margin-left: 5px;
     cursor: pointer;
     color: #999;
     font-weight: bold;
     font-size: 13px;
     line-height: 1;
 }

 .remove-tag:hover {
     color: #ff3333;
 }

 .no-selection {
     color: #999;
     font-style: italic;
     padding: 10px;
     text-align: center;
     font-size: 12px;
 }

 .query-btn {
     background-color: #1a8cff;
     color: white;
     border: none;
     border-radius: 4px;
     padding: 8px 15px;
     cursor: pointer;
     font-size: 13px;
     transition: all 0.3s;
     width: 100%;
     position: relative;
 }

 .query-btn.loading {
     background-color: #ccc;
     cursor: not-allowed;
 }

 .query-btn.loading::after {
     content: '';
     position: absolute;
     right: 10px;
     top: 50%;
     transform: translateY(-50%);
     width: 12px;
     height: 12px;
     border: 2px solid #f3f3f3;
     border-top: 2px solid #3498db;
     border-radius: 50%;
     animation: spin 1s linear infinite;
 }

 @keyframes spin {
     0% {
         transform: translateY(-50%) rotate(0deg);
     }

     100% {
         transform: translateY(-50%) rotate(360deg);
     }
 }

 .query-btn:hover:not(.loading) {
     background-color: #0066cc;
     box-shadow: 0 2px 5px rgba(26, 140, 255, 0.3);
 }

 .query-btn.clear {
     background-color: #f0f3f7;
     color: #666;
     margin-top: 5px;
 }

 .query-btn.clear:hover:not(.loading) {
     background-color: #e1e8f0;
 }

 .middle-panel {
     background-color: #fff;
     border-radius: 8px;
     padding: 20px;
     margin-bottom: 15px;
     box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
     border-left: 4px solid #1a8cff;
 }

 .middle-panel h2 {
     color: #008060;
     margin-bottom: 15px;
     font-size: 18px;
     display: flex;
     align-items: center;
 }

 .middle-panel h2 i {
     margin-right: 10px;
     color: #1a8cff;
 }

 .column-section {
     margin-bottom: 20px;
 }

 .section-title {
     font-weight: 600;
     color: #2c3e50;
     margin-bottom: 10px;
     padding-bottom: 5px;
     border-bottom: 1px solid #e1e8f0;
     font-size: 15px;
 }

 .column-selector {
     display: flex;
     flex-wrap: wrap;
     gap: 10px;
 }

 .column-item {
     display: flex;
     align-items: center;
     background-color: #f0f9f6;
     padding: 8px 15px;
     border-radius: 20px;
     border: 1px solid #cceee6;
     cursor: pointer;
     transition: all 0.2s;
 }

 .column-item:hover {
     background-color: #e0f5ef;
 }

 .column-item.selected {
     background-color: #1a8cff;
     color: white;
     border-color: #1a8cff;
 }

 .column-checkbox {
     margin-right: 8px;
 }

 .bottom-panel {
     background-color: #fff;
     border-radius: 8px;
     padding: 20px;
     box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
     border-left: 4px solid #1a8cff;
 }

 .bottom-panel h2 {
     color: #cc5200;
     margin-bottom: 15px;
     font-size: 18px;
     display: flex;
     align-items: center;
 }

 .bottom-panel h2 i {
     margin-right: 10px;
     color: #ff6600;
 }

 .result-info {
     margin-bottom: 15px;
     color: #666;
     font-size: 14px;
 }

 .action-buttons {
     display: flex;
     gap: 10px;
     margin-bottom: 20px;
     flex-wrap: wrap;
 }

 .action-btn {
     background-color: #f0f3f7;
     border: 1px solid #d1d9e6;
     border-radius: 4px;
     padding: 8px 15px;
     cursor: pointer;
     font-size: 13px;
     color: #2c3e50;
     transition: all 0.2s;
 }

 .action-btn:hover {
     background-color: #e1e8f0;
 }

 .action-btn.primary {
     background-color: #1a8cff;
     color: white;
     border-color: #1a8cff;
 }

 .action-btn.primary:hover {
     background-color: #0066cc;
 }

 /* .modal-overlay {
     display: none;
     position: fixed;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     background-color: rgba(0, 0, 0, 0.5);
     z-index: 1000;
     justify-content: center;
     align-items: center;
 }

 .modal-content {
     background-color: white;
     border-radius: 8px;
     width: 90%;
     max-width: 700px;
     max-height: 80vh;
     overflow: hidden;
     box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
 }

 .modal-header {
     background-color: #1a8cff;
     color: white;
     padding: 15px 20px;
     font-size: 16px;
     font-weight: 600;
     display: flex;
     justify-content: space-between;
     align-items: center;
 }

 .modal-body {
     padding: 20px;
     max-height: 60vh;
     overflow-y: auto;
 }

 .close-btn {
     background: none;
     border: none;
     color: white;
     font-size: 20px;
     cursor: pointer;
     line-height: 1;
 }

 .search-box {
     margin-bottom: 15px;
     display: flex;
     gap: 10px;
 }

 .search-input {
     flex-grow: 1;
     padding: 10px 15px;
     border: 1px solid #d1d9e6;
     border-radius: 4px;
     font-size: 14px;
 }

 .select-all-btn {
     background-color: #f0f3f7;
     border: 1px solid #d1d9e6;
     border-radius: 4px;
     padding: 8px 15px;
     cursor: pointer;
     font-size: 13px;
     color: #2c3e50;
 }

 .modal-list {
     list-style: none;
     display: grid;
     grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
     gap: 8px;
 }

 .modal-list li {
     padding: 10px 12px;
     border: 1px solid #f0f3f7;
     border-radius: 4px;
     cursor: pointer;
     transition: all 0.2s;
     display: flex;
     align-items: center;
 }

 .modal-list li:hover {
     background-color: #f0f9ff;
     border-color: #b3d9ff;
 }

 .modal-list li.selected {
     background-color: #e6f2ff;
     color: #1a8cff;
     font-weight: 500;
     border-color: #1a8cff;
 }

 .modal-checkbox {
     margin-right: 10px;
 }

 .modal-footer {
     padding: 15px 20px;
     background-color: #f8fafc;
     display: flex;
     justify-content: space-between;
     align-items: center;
 }

 .selected-count {
     color: #666;
     font-size: 14px;
 }

 .loading-indicator {
     display: none;
     text-align: center;
     padding: 20px;
     color: #666;
     font-size: 14px;
 }

 .loading-spinner {
     display: inline-block;
     width: 20px;
     height: 20px;
     border: 3px solid #f3f3f3;
     border-top: 3px solid #3498db;
     border-radius: 50%;
     animation: spin 1s linear infinite;
     margin-right: 10px;
     vertical-align: middle;
 }

 .footer-info {
     margin-top: 20px;
     padding-top: 15px;
     border-top: 1px solid #eee;
     color: #888;
     font-size: 12px;
     text-align: center;
 }

 @media (max-width: 1400px) {
     .query-panel {
         grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
     }
 }

 @media (max-width: 1200px) {
     .query-panel {
         grid-template-columns: repeat(2, 1fr);
     }
 }

 @media (max-width: 768px) {
     .query-panel {
         grid-template-columns: 1fr;
     }

     .action-buttons {
         flex-wrap: wrap;
     }

     .modal-list {
         grid-template-columns: 1fr;
     }
 } */


 /* Updated Modal Styles */
 .modal-overlay {
     display: none;
     position: fixed;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     background-color: rgba(0, 0, 0, 0.7);
     z-index: 1000;
     justify-content: center;
     align-items: center;
     padding: 20px;
 }

 .modal-content {
     background-color: white;
     border-radius: 8px;
     width: 90%;
     height: 90%;
     max-width: 1400px;
     overflow: hidden;
     box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
     display: flex;
     flex-direction: column;
     position: relative;
 }

 .modal-content.minimized {
     width: 70%;
     height: 70%;
     max-width: 1000px;
 }

 .modal-header {
     background-color: #1a8cff;
     color: white;
     padding: 15px 20px;
     font-size: 16px;
     font-weight: 600;
     display: flex;
     justify-content: space-between;
     align-items: center;
     flex-shrink: 0;
 }

 .modal-controls {
     display: flex;
     gap: 10px;
     align-items: center;
 }

 .modal-control-btn {
     background: rgba(255, 255, 255, 0.2);
     border: none;
     color: white;
     width: 32px;
     height: 32px;
     border-radius: 4px;
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 16px;
     transition: all 0.2s;
 }

 .modal-control-btn:hover {
     background: rgba(255, 255, 255, 0.3);
 }

 .close-btn {
     background: none;
     border: none;
     color: white;
     font-size: 20px;
     cursor: pointer;
     line-height: 1;
     width: 32px;
     height: 32px;
     display: flex;
     align-items: center;
     justify-content: center;
     border-radius: 4px;
 }

 .close-btn:hover {
     background: rgba(255, 255, 255, 0.2);
 }

 .modal-body {
     padding: 20px;
     overflow: hidden;
     display: flex;
     flex-direction: column;
     flex-grow: 1;
 }

 .search-box {
     margin-bottom: 15px;
     display: flex;
     gap: 10px;
     align-items: center;
     flex-shrink: 0;
 }

 .search-input {
     flex-grow: 1;
     padding: 10px 15px;
     border: 1px solid #d1d9e6;
     border-radius: 4px;
     font-size: 14px;
 }

 .loading-indicator {
     display: none;
     text-align: center;
     padding: 20px;
     color: #666;
     font-size: 14px;
     flex-grow: 1;
     display: flex;
     align-items: center;
     justify-content: center;
 }

 .loading-spinner {
     display: inline-block;
     width: 20px;
     height: 20px;
     border: 3px solid #f3f3f3;
     border-top: 3px solid #3498db;
     border-radius: 50%;
     animation: spin 1s linear infinite;
     margin-right: 10px;
     vertical-align: middle;
 }

 .error-message {
     display: none;
     padding: 20px;
     color: #ff3333;
     text-align: center;
     font-size: 14px;
     flex-grow: 1;
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
 }

 .retry-btn {
     background-color: #ff6666;
     color: white;
     border: none;
     border-radius: 4px;
     padding: 8px 16px;
     cursor: pointer;
     font-size: 13px;
     margin-top: 10px;
 }

 .datagrid-container {
     flex-grow: 1;
     overflow: hidden;
     border: 1px solid #e1e8f0;
     border-radius: 4px;
 }

 .modal-footer {
     padding: 15px 20px;
     background-color: #f8fafc;
     display: flex;
     justify-content: space-between;
     align-items: center;
     border-top: 1px solid #e1e8f0;
     flex-shrink: 0;
 }

 .selected-count {
     color: #666;
     font-size: 14px;
 }

 .footer-info {
     margin-top: 20px;
     padding-top: 15px;
     border-top: 1px solid #eee;
     color: #888;
     font-size: 12px;
     text-align: center;
 }

 .total-count {
     font-weight: 600;
     color: #1a8cff;
 }

 .tab-actions {
     display: flex;
     gap: 10px;
     margin-bottom: 15px;
     justify-content: flex-end;
 }

 .no-data {
     text-align: center;
     padding: 40px;
     color: #888;
     font-size: 16px;
 }

 .category-info-panel {
     background-color: #f8fafc;
     border-radius: 6px;
     padding: 12px 15px;
     margin-bottom: 15px;
     border: 1px solid #e1e8f0;
     display: flex;
     justify-content: space-between;
     align-items: center;
 }

 .category-info-item {
     display: flex;
     flex-direction: column;
     align-items: center;
     padding: 0 15px;
 }

 .category-info-label {
     font-size: 12px;
     color: #666;
     margin-bottom: 5px;
 }

 .category-info-value {
     font-size: 18px;
     font-weight: 600;
     color: #2c3e50;
 }

 .category-info-value.total {
     color: #1a8cff;
 }

 .category-info-value.selected {
     color: #00cc99;
 }

 .category-info-divider {
     width: 1px;
     height: 30px;
     background-color: #e1e8f0;
 }

 @media (max-width: 1600px) {
     .query-panel {
         grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
     }
 }

 @media (max-width: 1400px) {
     .query-panel {
         grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
     }
 }

 @media (max-width: 1200px) {
     .query-panel {
         grid-template-columns: repeat(3, 1fr);
     }

     .result-info {
         flex-direction: column;
         align-items: flex-start;
     }

     .category-info-panel {
         flex-wrap: wrap;
     }

     .modal-content {
         width: 95%;
         height: 95%;
     }
 }

 @media (max-width: 992px) {
     .query-panel {
         grid-template-columns: repeat(2, 1fr);
     }

     .modal-content {
         width: 98%;
         height: 98%;
     }

     .modal-content.minimized {
         width: 85%;
         height: 85%;
     }
 }

 @media (max-width: 768px) {
     .query-panel {
         grid-template-columns: 1fr;
     }

     .action-buttons {
         flex-wrap: wrap;
     }

     .tab-header {
         flex-wrap: wrap;
     }

     .tab-header-controls {
         margin-left: 0;
         margin-top: 10px;
         width: 100%;
         justify-content: flex-end;
     }

     .alert-content {
         width: 95%;
         margin: 10px;
     }

     .alert-header {
         padding: 15px 20px;
     }

     .alert-body {
         padding: 20px;
     }

     .alert-footer {
         flex-direction: column;
     }

     .alert-btn {
         width: 100%;
     }

     .category-info-panel {
         flex-direction: column;
         align-items: stretch;
     }

     .category-info-divider {
         display: none;
     }

     .category-info-item {
         flex-direction: row;
         justify-content: space-between;
         padding: 8px 0;
         border-bottom: 1px solid #e1e8f0;
     }

     .category-info-item:last-child {
         border-bottom: none;
     }

     .modal-content {
         width: 100%;
         height: 100%;
         border-radius: 0;
     }

     .modal-content.minimized {
         width: 100%;
         height: 100%;
         border-radius: 0;
     }
 }

 .icon {
     display: inline-block;
     width: 20px;
     height: 20px;
     margin-right: 8px;
     text-align: center;
 }

 .category-icon {
     margin-right: 8px;
     color: #1a8cff;
 }

 .error-message {
     color: #ff3333;
     text-align: center;
     padding: 20px;
     font-size: 14px;
 }

 .retry-btn {
     background-color: #ff6666;
     color: white;
     border: none;
     border-radius: 4px;
     padding: 5px 10px;
     cursor: pointer;
     font-size: 12px;
     margin-left: 10px;
 }







 .dptop-header-container {
     display: flex;
     justify-content: space-between;
     align-items: center;
     padding: 20px;
     /* background: #f8f9fa; */
 }

 .dptop-header-title {
     font-size: 22px;
     /* color: #333; */
     /* font-weight: bold; */
 }

 .dptop-nav-links {
     display: flex;
     align-items: center;
     gap: 0;
 }

 .dptop-nav-link {
     text-decoration: none;
     color: #495057;
     padding: 8px 12px;
     transition: all 0.3s ease;
     border-radius: 4px;
 }

 .dptop-nav-link:hover {
     background-color: #e9ecef;
     color: #007bff;
 }

 .dptop-nav-divider {
     color: #adb5bd;
     font-weight: 200;
 }