﻿.admin-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.room-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    overflow: hidden;
    background: white;
}

    .room-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    }

.room-header {
    background: linear-gradient(to right, #667eea, #764ba2);
    color: white;
    padding: 1.25rem 1.5rem;
    border-bottom: none;
}

.sensor-item {
    border: none;
    border-left: 4px solid #667eea;
    margin-bottom: 0.5rem;
    border-radius: 0 8px 8px 0;
    transition: all 0.2s ease;
    padding: 1rem;
}

    .sensor-item:hover {
        background-color: #f8f9ff;
        border-left-width: 6px;
        transform: translateX(5px);
    }

.sensor-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.1rem;
}

.sensor-temperature {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
}

.sensor-smoke {
    background: linear-gradient(135deg, #ff9e44, #ffb76d);
    color: white;
}

.sensor-power {
    background: linear-gradient(135deg, #1dd1a1, #2ecc71);
    color: white;
}



.sensor-default {
    background: linear-gradient(135deg, #54a0ff, #3498db);
    color: white;
}


.sensor-temperature {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
}

.sensor-smoke {
    background: linear-gradient(135deg, #ff9e44, #ffb76d);
    color: white;
}

.sensor-power {
    background: linear-gradient(135deg, #1dd1a1, #2ecc71);
    color: white;
}

.sensor-waterleak {
    background: linear-gradient(135deg, #00b4d8, #0077b6);
    color: white;
}

.sensor-doorstatus {
    background: linear-gradient(135deg, #9d4edd, #7b2cbf);
    color: white;
}

.sensor-default {
    background: linear-gradient(135deg, #54a0ff, #3498db);
    color: white;
}

.badge-temperature {
    background-color: #ff6b6b;
    color: white;
}

.badge-smoke {
    background-color: #ff9e44;
    color: white;
}

.badge-power {
    background-color: #1dd1a1;
    color: white;
}

.badge-waterleak {
    background-color: #00b4d8;
    color: white;
}

.badge-doorstatus {
    background-color: #9d4edd;
    color: white;
}

.badge-default {
    background-color: #54a0ff;
    color: white;
}



.btn-edit {
    background: linear-gradient(to right, #3498db, #2980b9);
    border: none;
    color: white;
    transition: all 0.3s ease;
    border-radius: 6px;
    padding: 0.375rem 0.75rem;
}

    .btn-edit:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
    }

.btn-delete {
    background: linear-gradient(to right, #e74c3c, #c0392b);
    border: none;
    color: white;
    transition: all 0.3s ease;
    border-radius: 6px;
    padding: 0.375rem 0.75rem;
}

    .btn-delete:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
    }

.btn-add {
    background: linear-gradient(to right, #9b59b6, #8e44ad);
    border: none;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(155, 89, 182, 0.2);
}

    .btn-add:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 12px rgba(155, 89, 182, 0.3);
    }

.btn-add-sensor {
    background: linear-gradient(to right, #2ecc71, #27ae60);
    border: none;
    color: white;
    border-radius: 6px;
    padding: 0.375rem 0.75rem;
    transition: all 0.3s ease;
}

    .btn-add-sensor:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 8px rgba(46, 204, 113, 0.3);
    }

.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    flex-direction: column;
}

.spinner {
    width: 3rem;
    height: 3rem;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

    .empty-state i {
        font-size: 4rem;
        margin-bottom: 1rem;
        opacity: 0.5;
    }

.sensor-identifier {
    font-family: 'Courier New', monospace;
    background-color: #f8f9fa;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #495057;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
}

.modal-content-custom {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: modalFadeIn 0.3s ease-out;
    width: auto;
    margin: 1rem;
    max-width: 90vw;
    max-height: 95%;
    /*    overflow-x: auto;*/
    overflow-y: auto;
    white-space: nowrap;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header-custom {
    background: linear-gradient(to right, #667eea, #764ba2);
    color: white;
    padding: 1.25rem;
    border-bottom: none;
}

.modal-body-custom {
    padding-top: 1.5rem;
    padding-right: 8.5rem;
    padding-left: 1.5rem;
}

.modal-footer-custom {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.form-control-custom {
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 0.75rem;
    transition: all 0.3s;
    margin-bottom: 1rem;
}

    .form-control-custom:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    }

.btn-close-custom {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    opacity: 0.8;
    transition: opacity 0.3s;
}

    .btn-close-custom:hover {
        opacity: 1;
    }

.sensor-type-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-temperature {
    background-color: #ff6b6b;
    color: white;
}

.badge-smoke {
    background-color: #ff9e44;
    color: white;
}

.badge-power {
    background-color: #1dd1a1;
    color: white;
}

.badge-default {
    background-color: #54a0ff;
    color: white;
}

@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
    }

    .sensor-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .sensor-info {
        margin-bottom: 1rem;
        width: 100%;
    }
}
