/* HTTP Scan Module Styles */

.http-scan-module {
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.scan-header {
    margin-bottom: 20px;
}

.scan-header h2 {
    margin: 0 0 8px 0;
    color: var(--text);
    font-size: 24px;
}

.scan-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.scan-controls {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.scan-options {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.scan-progress-section {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--surface-light) 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.scan-progress-container {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.results-header h3 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
}

.results-table-container {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th,
.results-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.results-table th {
    background: var(--surface);
    font-weight: 600;
    color: var(--text);
}

.results-table tr:last-child td {
    border-bottom: none;
}

.entities-list {
    margin: 0;
    padding-left: 16px;
    list-style-type: disc;
}

.entities-list li {
    margin-bottom: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.online {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.status-badge.offline {
    background: rgba(244, 67, 54, 0.2);
    color: #F44336;
}

.scan-log {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.scan-log h4 {
    margin: 0 0 12px 0;
    color: var(--text);
}

.log-content {
    height: 150px;
    overflow-y: auto;
    background: var(--surface);
    border-radius: 8px;
    padding: 12px;
    font-family: monospace;
    font-size: 12px;
}

.log-entry {
    margin-bottom: 4px;
    padding: 4px 0;
}

.log-entry.info {
    color: var(--text-secondary);
}

.log-entry.success {
    color: #4CAF50;
}

.log-entry.error {
    color: #F44336;
}

@media (max-width: 768px) {
    .scan-options {
        flex-direction: column;
        gap: 10px;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .results-table {
        font-size: 12px;
    }

    .results-table th,
    .results-table td {
        padding: 8px;
    }
}

/* Dark Theme Styles for HTTP Scan Module - Modern Design */

.http-scan-container {
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--surface);
}



/* Buttons */
.scan-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Header buttons - increased height to match text height */
.header-actions {
    min-height: 40px;
    float: right;
    justify-content: center;
    align-items: center;
}

.header-actions .btn {
   
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    justify-content: center;
    align-items: center;
}

/* Extended Settings Styles */
.full-width {
    grid-column: 1 / -1;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.form-range {
    width: 100%;
    height: 4px;
    outline: none;
    opacity: 0.7;
    transition: opacity 0.2s;
    border-radius: 2px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, var(--primary) 0%, var(--primary) var(--value), #333 var(--value), #333 100%);
    background-size: 100% 100%;
}

.form-range:hover {
    opacity: 1;
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 30px;
    height: 30px;
    background: var(--primary);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    border: 2px solid var(--surface);
}

.form-range::-moz-range-thumb {
    width: 30px;
    height: 30px;
    background: var(--primary);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    border: 2px solid var(--surface);
}

.range-value {
    text-align: center;
    font-weight: bold;
    color: #00d4ff;
    margin-top: 5px;
}

/* Results Section */
.scan-results-section {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--surface-light) 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.results-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text);
    font-weight: 600;
}

.results-actions {
    display: flex;
    gap: 8px;
}

.results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--surface-light);
    border-radius: 8px;
}

.summary-item {
    text-align: center;
}

.summary-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.summary-value {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
}

.results-table-container {
    overflow-x: auto;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
}

.results-table th {
    background: var(--surface-light);
    padding: 10px 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.results-table td {
    padding: 10px 12px;
    font-size: 13px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.results-table tr:hover {
    background: var(--surface-light);
}

.results-table .no-results {
    text-align: center;
    padding: 24px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Column widths for 7-column table */
.results-table th:nth-child(1),
.results-table td:nth-child(1) {
    width: 64px;
}

.results-table th:nth-child(2),
.results-table td:nth-child(2) {
    width: 15%;
}

.results-table th:nth-child(3),
.results-table td:nth-child(3) {
    width: 15%;
}

.results-table th:nth-child(4),
.results-table td:nth-child(4) {
    width: 15%;
}

.results-table th:nth-child(5),
.results-table td:nth-child(5) {
    width: 15%;
}

/* Configuration Grid and Section Styles */
.configuration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.config-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.config-section:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.config-section h3 {
    margin: 0 0 16px 0;
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.config-section h3::before {
    content: '';
    width: 4px;
    height: 16px;
    background: var(--primary);
    border-radius: 2px;
}

.config-section .form-group {
    margin-bottom: 16px;
}

.config-section .form-group:last-child {
    margin-bottom: 0;
}

.config-section label {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
}

.config-section input[type="text"],
.config-section input[type="range"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    transition: all 0.2s ease;
}

.config-section input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.config-section small {
    display: block;
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 12px;
}

/* Full width config section */
.config-section.full-width {
    grid-column: 1 / -1;
}

/* Sliders and checkboxes styling */
.sliders-row,
.checkboxes-row {
    display: flex;
    gap: 20px;
    margin-top: 16px;
}

.slider-group,
.checkbox-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.slider-group label,
.checkbox-group label {
    margin-bottom: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.slider-value {
    text-align: center;
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    margin-top: 4px;
}

/* Checkbox styling in config sections */
.config-section input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.config-section .checkbox-text {
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
}

.config-section .checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
}

/* Device action buttons - styled like Export button */
.device-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.device-actions .btn {
    padding: 6px 10px;
    font-size: 0.8rem;
    min-height: 28px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.device-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

.device-actions .btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.device-actions .btn i {
    font-size: 0.9rem;
    margin: 0;
}

/* Theme-specific variations for device action buttons 
[data-theme="blue_dark"] .device-actions .btn {
    background: linear-gradient(135deg, #4da6ff 0%, #3385ff 100%);
}

[data-theme="blue_dark"] .device-actions .btn:hover {
    background: linear-gradient(135deg, #66b3ff 0%, #4da6ff 100%);
}

[data-theme="amber_dark"] .device-actions .btn {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

[data-theme="amber_dark"] .device-actions .btn:hover {
    background: linear-gradient(135deg, #ffa726 0%, #ff9800 100%);
}

[data-theme="custom_dark"] .device-actions .btn {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
}

[data-theme="custom_dark"] .device-actions .btn:hover {
    background: linear-gradient(135deg, #ba68c8 0%, #9c27b0 100%);
}

[data-theme="blue_light"] .device-actions .btn {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
}

[data-theme="blue_light"] .device-actions .btn:hover {
    background: linear-gradient(135deg, #42a5f5 0%, #2196f3 100%);
}

[data-theme="amber_light"] .device-actions .btn {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

[data-theme="amber_light"] .device-actions .btn:hover {
    background: linear-gradient(135deg, #ffa726 0%, #ff9800 100%);
}

[data-theme="custom_light"] .device-actions .btn {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
}

[data-theme="custom_light"] .device-actions .btn:hover {
    background: linear-gradient(135deg, #ba68c8 0%, #9c27b0 100%);
}
*/

/* Entity styling in modal */
.entity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin: 4px 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.2s ease;
}

/* WiFi info styling */
.wifi-info {
    font-size: 0.85rem;
    line-height: 1.4;
}

.wifi-info small {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.entity-item:hover {
    background: var(--surface-hover);
    border-color: var(--primary);
}

.entity-name {
    font-weight: 500;
    color: var(--text);
    flex: 1;
}

.entity-type {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    margin: 0 8px;
}

.entity-value {
    color: var(--text-secondary);
    font-family: monospace;
    font-size: 0.9rem;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 12px;
    text-transform: uppercase;
}

.status-badge.online {
    background: var(--success);
    color: white;
}

.status-badge.offline {
    background: var(--danger);
    color: white;
}

/* Detail rows styling */
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 120px;
}

.detail-value {
    color: var(--text);
    text-align: right;
}

/* Entities list styling */
.entities-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 200px;
    overflow-y: auto;
    padding: 8px 0;
}

.entities-list::-webkit-scrollbar {
    width: 6px;
}

.entities-list::-webkit-scrollbar-track {
    background: var(--surface);
    border-radius: 3px;
}

.entities-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.entities-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Entity Count Styles */
.entity-count {
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.entity-count:hover {
    background: var(--surface-light);
    transform: scale(1.05);
}

/* Entity Modal Styles */
/*
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
   
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    max-width: 90vw;
    max-height: 90vh;
    width: 700px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    background: var(--surface-light);
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--surface);
    color: var(--text);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(90vh - 120px);
}

*/
/* Entities Modal Styles */
.entities-modal {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.entities-summary {
    text-align: center;
}

.entity-count-badge {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.entities-table {
    overflow-x: auto;
}

.entities-table-content {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: 8px;
    overflow: hidden;
}

.entities-table-content th {
    background: var(--surface-light);
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.entities-table-content td {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.entities-table-content tr:last-child td {
    border-bottom: none;
}

.entities-table-content tr:hover {
    background: var(--surface-light);
}

/* Entity Icon Styles */
.entities-table-content td:first-child {
    width: 40px;
    text-align: center;
}

.entities-table-content td:first-child i {
    font-size: 16px;
    color: var(--primary);
}

/* Entity Type Badge Styles */
.entity-type-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.entity-type-badge.switch {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.entity-type-badge.thermometer {
    background: rgba(33, 150, 243, 0.2);
    color: #2196F3;
}

.entity-type-badge.sensor {
    background: rgba(156, 39, 176, 0.2);
    color: #9C27B0;
}

.entity-type-badge.motion_sensor {
    background: rgba(255, 152, 0, 0.2);
    color: #FF9800;
}

.entity-type-badge.light_sensor {
    background: rgba(255, 235, 59, 0.2);
    color: #FFEB3B;
}

.entity-type-badge.gas_sensor {
    background: rgba(121, 85, 72, 0.2);
    color: #795548;
}

.entity-type-badge.voltage_sensor {
    background: rgba(255, 87, 34, 0.2);
    color: #FF5722;
}

.entity-type-badge.current_sensor {
    background: rgba(0, 188, 212, 0.2);
    color: #00BCD4;
}

.entity-type-badge.power_sensor {
    background: rgba(63, 81, 181, 0.2);
    color: #3F51B5;
}

.entity-type-badge.energy_sensor {
    background: rgba(139, 195, 74, 0.2);
    color: #8BC34A;
}

.entity-type-badge.camera {
    background: rgba(244, 67, 54, 0.2);
    color: #F44336;
}

.entity-type-badge.lock {
    background: rgba(96, 125, 139, 0.2);
    color: #607D8B;
}

.entity-type-badge.light {
    background: rgba(255, 193, 7, 0.2);
    color: #FFC107;
}

.entity-type-badge.socket {
    background: rgba(233, 30, 99, 0.2);
    color: #E91E63;
}

.entity-type-badge.media {
    background: rgba(103, 58, 183, 0.2);
    color: #673AB7;
}

.entity-type-badge.other {
    background: rgba(158, 158, 158, 0.2);
    color: #9E9E9E;
}

/* Entity Value Styles */
.entity-name {
    font-weight: 500;
    color: var(--text);
}

.entity-path {
    font-family: monospace;
    font-size: 11px;
    color: var(--text-secondary);
}

.entity-value {
    font-weight: 500;
}

.entity-value-empty {
    color: var(--text-secondary);
    font-style: italic;
}

.entity-value-boolean {
    color: #4CAF50;
    font-weight: 600;
}

.entity-value-number {
    color: var(--primary);
    font-weight: 600;
}

/* Entity Count Styles */
.entity-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.entity-count i {
    font-size: 0.9rem;
}

/* WiFi Signal Styles */
.wifi-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

/* WiFi icon with signal bars */
.wifi-icon-container {
    display: flex;
    align-items: flex-end;
    height: 16px;
    margin-bottom: 2px;
}

.wifi-bars {
    display: flex;
    align-items: flex-end;
    height: 100%;
    gap: 1px;
}

.wifi-bar {
    width: 3px;
    background-color: var(--text-secondary);
    border-radius: 1px;
    transition: all 0.2s ease;
}

.wifi-bar-empty {
    width: 3px;
    background-color: transparent;
    border-radius: 1px;
}

.wifi-bar.excellent {
    background-color: #4CAF50;
    height: 12px;
}

.wifi-bar.good {
    background-color: #8BC34A;
    height: 10px;
}

.wifi-bar.fair {
    background-color: #FFC107;
    height: 8px;
}

.wifi-bar.poor {
    background-color: #FF9800;
    height: 6px;
}

.wifi-bar.very-poor {
    background-color: #F44336;
    height: 4px;
}

.wifi-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    text-align: center;
}

.wifi-signal {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
}

/* WiFi Signal Display for Table */
.wifi-signal-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.wifi-signal-icon {
    display: flex;
    align-items: flex-end;
    height: 20px;
    gap: 2px;
}

.wifi-signal-bar {
    width: 4px;
    border-radius: 1px;
    transition: all 0.2s ease;
}

.wifi-signal-bar-empty {
    width: 4px;
    background-color: var(--border);
    border-radius: 1px;
}

.wifi-signal-bar-excellent {
    background-color: #4CAF50;
}

.wifi-signal-bar-good {
    background-color: #8BC34A;
}

.wifi-signal-bar-fair {
    background-color: #FFC107;
}

.wifi-signal-bar-poor {
    background-color: #FF9800;
}

.wifi-signal-bar-very-poor {
    background-color: #F44336;
}

.wifi-signal-value {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.entity-value-string {
    color: #2196F3;
}

.entity-value-object {
    color: #FF9800;
    font-family: monospace;
    font-size: 11px;
}

/* Entity Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--card-bg);
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.modal-header h2 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: var(--text);
    background: var(--surface-light);
}

.modal-body {
    padding: 24px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

.entities-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.no-entities {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.no-entities i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.entity-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s ease;
}

.entity-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.entity-item.online {
    border-left: 4px solid #4CAF50;
}

.entity-item.offline {
    border-left: 4px solid #F44336;
}

.entity-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.entity-header i {
    font-size: 20px;
    color: var(--primary);
    width: 24px;
    text-align: center;
}

.entity-info h4 {
    margin: 0 0 4px 0;
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
}

.entity-value {
    color: var(--primary);
    font-weight: 500;
    font-size: 14px;
}

.entity-header i.status-online {
    color: #4CAF50;
}

.entity-header i.status-offline {
    color: #F44336;
}

.entity-details {
    margin-top: 12px;
    padding-top: 12px;

}

.entity-details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.entity-details-table td {
    padding: 4px 0;
    color: var(--text);
}

.entity-details-table td:first-child {
    font-weight: 500;
    color: var(--text-secondary);
    width: 40%;
}

.entity-details-table td:last-child {
    text-align: right;
}

/* DS18B20 specific styling */
.entity-item[data-entity-type="DS18B20"] .entity-header i {
    color: #2196F3;
}

.entity-item[data-entity-type="DS18B20"] .entity-value {
    color: #2196F3;
}
