:root {
    --primary-color: #71639e;
    --primary-dark: #4f456f;
    --text-muted: #6c757d;
}

body {
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* Navbar Styles */
.navbar {
    background-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0.5rem 1rem;
    height: 46px;
}

.navbar-brand {
    font-weight: 500;
    font-size: 1.25rem;
    color: white !important;
}

.navbar .nav-link {
    color: rgba(255,255,255,0.9) !important;
    padding: 0.5rem 1rem;
}

.navbar .nav-link:hover {
    color: white !important;
}

/* Card Styles */
.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.card-title {
    color: var(--primary-dark);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Device Info */
.device-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.device-info i {
    color: var(--primary-color);
    font-size: 0.875rem;
}

/* Timestamp */
.timestamp {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0.75rem 0;
}

/* Status Actions */
.status-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-status {
    background: none;
    border: none;
    padding: 0.375rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.btn-status img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.btn-status.active {
    cursor: pointer;
}

.btn-status.active img {
    stroke: var(--primary-color);
}

.btn-status.active:hover {
    background-color: rgba(0,0,0,0.05);
}

.btn-status.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Live Indicator */
.live-indicator {
    background-color: #dc3545;
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    font-weight: 500;
    margin-left: 0.5rem;
    text-transform: uppercase;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

/* State Icon */
.state-icon {
    width: 16px;
    height: 16px;
    margin-left: 0.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .container-fluid {
        padding: 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

.btn-status i {
    font-size: 16px;
    color: var(--primary-color);
}

.btn-status.disabled i {
    color: var(--text-muted);
}

.state-icon {
    color: #dc3545;
    margin-left: 0.5rem;
    animation: pulse 2s infinite;
}